aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-01-27 13:45:17 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-01-27 13:45:17 +0000
commit434ad5456b0468e469c9da140871121f87a1377b (patch)
treec7ee764e3171e0fae54712f63cb541f3c94c59d2
parente0eebc1ef3816bd75988021376a368dfe19470c5 (diff)
downloadbusybox-w32-434ad5456b0468e469c9da140871121f87a1377b.tar.gz
busybox-w32-434ad5456b0468e469c9da140871121f87a1377b.tar.bz2
busybox-w32-434ad5456b0468e469c9da140871121f87a1377b.zip
fix warning in find.c
-rw-r--r--findutils/find.c8
-rw-r--r--include/libbb.h2
-rw-r--r--libbb/xfuncs.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/findutils/find.c b/findutils/find.c
index f7d95325a..42cee87e1 100644
--- a/findutils/find.c
+++ b/findutils/find.c
@@ -59,7 +59,7 @@ typedef struct {
59#define ACTS(name, arg...) typedef struct { action a; arg; } action_##name; 59#define ACTS(name, arg...) typedef struct { action a; arg; } action_##name;
60#define ACTF(name) static int func_##name(const char *fileName, struct stat *statbuf, action_##name* ap) 60#define ACTF(name) static int func_##name(const char *fileName, struct stat *statbuf, action_##name* ap)
61 ACTS(print) 61 ACTS(print)
62 ACTS(name, char *pattern;) 62 ACTS(name, const char *pattern;)
63USE_FEATURE_FIND_PRINT0(ACTS(print0)) 63USE_FEATURE_FIND_PRINT0(ACTS(print0))
64USE_FEATURE_FIND_TYPE( ACTS(type, int type_mask;)) 64USE_FEATURE_FIND_TYPE( ACTS(type, int type_mask;))
65USE_FEATURE_FIND_PERM( ACTS(perm, char perm_char; mode_t perm_mask;)) 65USE_FEATURE_FIND_PERM( ACTS(perm, char perm_char; mode_t perm_mask;))
@@ -273,7 +273,7 @@ static int fileAction(const char *fileName, struct stat *statbuf, void* junk, in
273 273
274 274
275#if ENABLE_FEATURE_FIND_TYPE 275#if ENABLE_FEATURE_FIND_TYPE
276static int find_type(char *type) 276static int find_type(const char *type)
277{ 277{
278 int mask = 0; 278 int mask = 0;
279 279
@@ -349,8 +349,8 @@ static action*** parse_params(char **argv)
349// We implement: (), -a, -o 349// We implement: (), -a, -o
350 350
351 while (*argv) { 351 while (*argv) {
352 char *arg = argv[0]; 352 const char *arg = argv[0];
353 char *arg1 = argv[1]; 353 const char *arg1 = argv[1];
354 /* --- Operators --- */ 354 /* --- Operators --- */
355 if (strcmp(arg, "-a") == 0 355 if (strcmp(arg, "-a") == 0
356 USE_DESKTOP(|| strcmp(arg, "-and") == 0) 356 USE_DESKTOP(|| strcmp(arg, "-and") == 0)
diff --git a/include/libbb.h b/include/libbb.h
index 8b9842344..540170cdd 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -259,7 +259,7 @@ extern DIR *warn_opendir(const char *path);
259char *xgetcwd(char *cwd); 259char *xgetcwd(char *cwd);
260char *xreadlink(const char *path); 260char *xreadlink(const char *path);
261char *xmalloc_realpath(const char *path); 261char *xmalloc_realpath(const char *path);
262extern void xstat(char *filename, struct stat *buf); 262extern void xstat(const char *filename, struct stat *buf);
263extern pid_t spawn(char **argv); 263extern pid_t spawn(char **argv);
264extern pid_t xspawn(char **argv); 264extern pid_t xspawn(char **argv);
265extern int wait4pid(int pid); 265extern int wait4pid(int pid);
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c
index 4d85b1181..f7300a6d9 100644
--- a/libbb/xfuncs.c
+++ b/libbb/xfuncs.c
@@ -568,7 +568,7 @@ void xlisten(int s, int backlog)
568} 568}
569 569
570// xstat() - a stat() which dies on failure with meaningful error message 570// xstat() - a stat() which dies on failure with meaningful error message
571void xstat(char *name, struct stat *stat_buf) 571void xstat(const char *name, struct stat *stat_buf)
572{ 572{
573 if (stat(name, stat_buf)) 573 if (stat(name, stat_buf))
574 bb_perror_msg_and_die("can't stat '%s'", name); 574 bb_perror_msg_and_die("can't stat '%s'", name);