summaryrefslogtreecommitdiff
path: root/paxtest
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2021-02-27 17:59:00 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2021-02-27 17:59:27 -0800
commit6b73b09f931a0642e9615380374178ce0784e240 (patch)
treeeb3591071797afc0c44ad32db725b9299098beec /paxtest
parenta3b0c7b919c1faf5d8797d1c26fd632823b7e54e (diff)
downloadpaxutils-6b73b09f931a0642e9615380374178ce0784e240.tar.gz
Port better to non-GCC compilers
Gnulib now defines _Noreturn for us on pre-C11 compilers, so use that instead of the less-portable __attribute__ ((noreturn)). * lib/system.h (__attribute__): Remove; no longer used. * paxlib/paxlib.h: Use _Noreturn instead of __attribute__ ((noreturn)). * paxtest/paxtest.c (dump): First arg is char *, not unsigned char *, to avoid type mismatch.
Diffstat (limited to 'paxtest')
-rw-r--r--paxtest/paxtest.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/paxtest/paxtest.c b/paxtest/paxtest.c
index bf839ac..5ba7ce9 100644
--- a/paxtest/paxtest.c
+++ b/paxtest/paxtest.c
@@ -43,13 +43,16 @@ fatal_exit (void)
}
void
-dump (unsigned char *buf, size_t size)
+dump (char *buf, size_t size)
{
while (size)
{
int i;
for (i = 0; i < 16 && size; i++, size--, buf++)
- printf ("%02X ", *buf);
+ {
+ unsigned char ch = *buf;
+ printf ("%02X ", ch);
+ }
printf ("\n");
}
}