[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/9] Fix several small compiler warnings.
From: |
James Youngman |
Subject: |
[PATCH 3/9] Fix several small compiler warnings. |
Date: |
Sat, 4 Jun 2011 01:21:47 +0100 |
* 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 <address@hidden>
+ 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
- [PATCH 1/9] Don't display a separate gnulib version., James Youngman, 2011/06/03
- [PATCH 2/9] Fix some compiler warnings in findutils-version.c., James Youngman, 2011/06/03
- [PATCH 4/9] Fix compiler warnings in lib/fdleak.c, James Youngman, 2011/06/03
- [PATCH 5/9] Fix a compiler warning in lib/buildcmd.c, James Youngman, 2011/06/03
- [PATCH 9/9] Compiler warning fixes in find/pred.c., James Youngman, 2011/06/03
- [PATCH 7/9] Avoid code redundancy in lib/buildcmd.c., James Youngman, 2011/06/03
- [PATCH 8/9] Eliminate some compiler warnings in parser.c, James Youngman, 2011/06/03
- [PATCH 6/9] Eliminate some compiler warnings in find/parser.c., James Youngman, 2011/06/03
- [PATCH 3/9] Fix several small compiler warnings.,
James Youngman <=