From 1ca20a77476fb69e2472080ef6ba23c8c0ad12ad Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 21 Mar 2001 07:34:27 +0000 Subject: A nice patch from Larry Doolittle that adds -Wshadow and cleans up most of the now-revealed problems. --- libbb/parse_mode.c | 12 ++++++------ libbb/recursive_action.c | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'libbb') 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) S_ISVTX /* t */ }; - static const char group_string[] = "ugoa"; - static const char mode_string[] = "rwxst"; + static const char group_chars[] = "ugoa"; + static const char mode_chars[] = "rwxst"; const char *p; @@ -74,9 +74,9 @@ extern int parse_mode(const char *s, mode_t * theMode) if ((c = *s++) == '\0') { return -1; } - for (p=group_string ; *p ; p++) { + for (p=group_chars ; *p ; p++) { if (*p == c) { - groups |= group_set[(int)(p-group_string)]; + groups |= group_set[(int)(p-group_chars)]; goto NEXT_GROUP; } } @@ -101,9 +101,9 @@ extern int parse_mode(const char *s, mode_t * theMode) NEXT_MODE: if (((c = *s++) != '\0') && (c != ',')) { - for (p=mode_string ; *p ; p++) { + for (p=mode_chars ; *p ; p++) { if (*p == c) { - mode |= mode_set[(int)(p-mode_string)]; + mode |= mode_set[(int)(p-mode_chars)]; goto NEXT_MODE; } } 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 @@ */ #include +#include #include #include #include "libbb.h" -- cgit v1.2.3-55-g6feb