From fa3a309fda1233242596ce74eabf658d39654e56 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 4 Sep 2010 23:38:29 -0700 Subject: paxutils: remove lint discovered by Sun C compiler * paxlib/paxlib.h (pax_exit): Remove stray semicolon that I introduced in the previous patch; sorry about that. * tests/genfile.c (print_stat): Don't assume that mode_t promotes to unsigned int when calling a varargs function; that assumption is not portable. --- tests/genfile.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/genfile.c b/tests/genfile.c index 7ebeddf..19cbdcb 100644 --- a/tests/genfile.c +++ b/tests/genfile.c @@ -582,13 +582,13 @@ print_stat (const char *name) printf ("%lu", (unsigned long) st.st_ino); else if (strncmp (p, "mode", 4) == 0) { - mode_t mask = ~0; + unsigned val = st.st_mode; if (ispunct ((unsigned char) p[4])) { char *q; - mask = strtoul (p + 5, &q, 8); + val &= strtoul (p + 5, &q, 8); if (*q) { printf ("\n"); @@ -600,7 +600,7 @@ print_stat (const char *name) printf ("\n"); error (EXIT_FAILURE, 0, _("Unknown field `%s'"), p); } - printf ("%0o", st.st_mode & mask); + printf ("%0o", val); } else if (strcmp (p, "nlink") == 0) printf ("%lu", (unsigned long) st.st_nlink); @@ -699,7 +699,7 @@ exec_checkpoint (struct action *p) if (unlink (p->name)) error (0, errno, _("cannot unlink `%s'"), p->name); break; - + default: abort (); } -- cgit v1.2.1