* lib/dircallback.c: Include dircallback.h. * lib/dircallback.h: Correct declaration of run_in_dir. * lib/listfile.c (file_blocksize): Use the otherwise-unused parameter. * find/defs.h: Remove redundant declaration of variable options. --- ChangeLog | 6 ++++++ find/defs.h | 1 - lib/dircallback.c | 2 +- lib/dircallback.h | 2 +- lib/listfile.c | 3 ++- 5 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog index 9682b55..f84b5c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2011-06-03 James Youngman <[email protected]> + Fix several small compiler warnings. + * lib/dircallback.c: Include dircallback.h. + * lib/dircallback.h: Correct declaration of run_in_dir. + * lib/listfile.c (file_blocksize): Use the otherwise-unused parameter. + * find/defs.h: Remove redundant declaration of variable options. + Fix some compiler warnings in findutils-version.c. * lib/findutils-version.c: include findutils-version.h. Make version_string const. Don't #define N_, since we don't use it. diff --git a/find/defs.h b/find/defs.h index 11d1d00..a7fd7d9 100644 --- a/find/defs.h +++ b/find/defs.h @@ -624,7 +624,6 @@ struct options */ enum quoting_style err_quoting_style; }; -extern struct options options; struct state diff --git a/lib/dircallback.c b/lib/dircallback.c index c1e4088..6eb1160 100644 --- a/lib/dircallback.c +++ b/lib/dircallback.c @@ -21,7 +21,7 @@ #include <config.h> - +#include "dircallback.h" #include "openat.h" #include <stdarg.h> #include <stddef.h> diff --git a/lib/dircallback.h b/lib/dircallback.h index d2f74c4..6b928eb 100644 --- a/lib/dircallback.h +++ b/lib/dircallback.h @@ -22,6 +22,6 @@ struct saved_cwd; int run_in_dirfd (int fd, int (*callback)(void*), void *usercontext); -int run_in_dir (struct saved_cwd*, int (*callback)(void*), void *usercontext); +int run_in_dir (const struct saved_cwd*, int (*callback)(void*), void *usercontext); #endif diff --git a/lib/listfile.c b/lib/listfile.c index 21b0cd6..0c1e4b8 100644 --- a/lib/listfile.c +++ b/lib/listfile.c @@ -132,6 +132,7 @@ static void print_name (register const char *p, FILE *stream, int literal_contro size_t file_blocksize (const struct stat *p) { + (void)p; return ST_NBLOCKSIZE; } @@ -171,7 +172,7 @@ list_file (const char *name, fprintf (stream, "%6s ", human_readable ((uintmax_t) statp->st_ino, hbuf, human_ceiling, - 1, 1)); + 1u, 1u)); fprintf (stream, "%4s ", human_readable ((uintmax_t) ST_NBLOCKS (*statp), hbuf, -- 1.7.2.5
