diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-03-21 07:34:27 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-03-21 07:34:27 +0000 |
commit | 1ca20a77476fb69e2472080ef6ba23c8c0ad12ad (patch) | |
tree | d1f07be4de0004fe5e30b44320e10285147e7944 /libbb | |
parent | 7447642a47c6a0aefd05f4acf730950a510634cd (diff) | |
download | busybox-w32-1ca20a77476fb69e2472080ef6ba23c8c0ad12ad.tar.gz busybox-w32-1ca20a77476fb69e2472080ef6ba23c8c0ad12ad.tar.bz2 busybox-w32-1ca20a77476fb69e2472080ef6ba23c8c0ad12ad.zip |
A nice patch from Larry Doolittle that adds -Wshadow and
cleans up most of the now-revealed problems.
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/parse_mode.c | 12 | ||||
-rw-r--r-- | libbb/recursive_action.c | 1 |
2 files changed, 7 insertions, 6 deletions
diff --git a/libbb/parse_mode.c b/libbb/parse_mode.c index 33a878122..a68b7d3aa 100644 --- a/libbb/parse_mode.c +++ b/libbb/parse_mode.c | |||
@@ -50,8 +50,8 @@ extern int parse_mode(const char *s, mode_t * theMode) | |||
50 | S_ISVTX /* t */ | 50 | S_ISVTX /* t */ |
51 | }; | 51 | }; |
52 | 52 | ||
53 | static const char group_string[] = "ugoa"; | 53 | static const char group_chars[] = "ugoa"; |
54 | static const char mode_string[] = "rwxst"; | 54 | static const char mode_chars[] = "rwxst"; |
55 | 55 | ||
56 | const char *p; | 56 | const char *p; |
57 | 57 | ||
@@ -74,9 +74,9 @@ extern int parse_mode(const char *s, mode_t * theMode) | |||
74 | if ((c = *s++) == '\0') { | 74 | if ((c = *s++) == '\0') { |
75 | return -1; | 75 | return -1; |
76 | } | 76 | } |
77 | for (p=group_string ; *p ; p++) { | 77 | for (p=group_chars ; *p ; p++) { |
78 | if (*p == c) { | 78 | if (*p == c) { |
79 | groups |= group_set[(int)(p-group_string)]; | 79 | groups |= group_set[(int)(p-group_chars)]; |
80 | goto NEXT_GROUP; | 80 | goto NEXT_GROUP; |
81 | } | 81 | } |
82 | } | 82 | } |
@@ -101,9 +101,9 @@ extern int parse_mode(const char *s, mode_t * theMode) | |||
101 | 101 | ||
102 | NEXT_MODE: | 102 | NEXT_MODE: |
103 | if (((c = *s++) != '\0') && (c != ',')) { | 103 | if (((c = *s++) != '\0') && (c != ',')) { |
104 | for (p=mode_string ; *p ; p++) { | 104 | for (p=mode_chars ; *p ; p++) { |
105 | if (*p == c) { | 105 | if (*p == c) { |
106 | mode |= mode_set[(int)(p-mode_string)]; | 106 | mode |= mode_set[(int)(p-mode_chars)]; |
107 | goto NEXT_MODE; | 107 | goto NEXT_MODE; |
108 | } | 108 | } |
109 | } | 109 | } |
diff --git a/libbb/recursive_action.c b/libbb/recursive_action.c index 6b93340be..8424ca0bf 100644 --- a/libbb/recursive_action.c +++ b/libbb/recursive_action.c | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <stdio.h> | 28 | #include <stdio.h> |
29 | #include <string.h> | ||
29 | #include <dirent.h> | 30 | #include <dirent.h> |
30 | #include <sys/stat.h> | 31 | #include <sys/stat.h> |
31 | #include "libbb.h" | 32 | #include "libbb.h" |