summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2010-09-04 23:38:29 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2010-09-04 23:39:09 -0700
commitfa3a309fda1233242596ce74eabf658d39654e56 (patch)
tree5ffd547cb20ffbbe5fcdd3cd8f0aa05eb1a8be6a
parent2a4321c57456bb92e3e83af93622c5b9acc05a56 (diff)
downloadpaxutils-fa3a309fda1233242596ce74eabf658d39654e56.tar.gz
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.
-rw-r--r--paxlib/paxlib.h2
-rw-r--r--tests/genfile.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/paxlib/paxlib.h b/paxlib/paxlib.h
index 4aaf2eb..eeb445e 100644
--- a/paxlib/paxlib.h
+++ b/paxlib/paxlib.h
@@ -100,7 +100,7 @@ void waitpid_error (char const *);
void write_error (char const *);
void write_error_details (char const *, size_t, size_t);
-void pax_exit (void) __attribute__ ((noreturn));;
+void pax_exit (void) __attribute__ ((noreturn));
void fatal_exit (void) __attribute__ ((noreturn));
#define STRINGIFY_BIGINT(i, b) umaxtostr (i, b)
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 ();
}