summaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorDenys Vlasenko2017-12-31 17:30:02 +0100
committerDenys Vlasenko2017-12-31 17:30:02 +0100
commit82d1c1f84ae23793d81b50aa0a753ad7c4db4f51 (patch)
treee5c1dc00b04299cf627cf2ef18453aea96c5f1e5 /coreutils
parent36acc4631c94bb0f43ecaac5d61dc773ef773e91 (diff)
downloadbusybox-82d1c1f84ae23793d81b50aa0a753ad7c4db4f51.zip
busybox-82d1c1f84ae23793d81b50aa0a753ad7c4db4f51.tar.gz
randomconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/cat.c5
-rw-r--r--coreutils/ls.c5
-rw-r--r--coreutils/stat.c7
-rw-r--r--coreutils/uname.c6
4 files changed, 13 insertions, 10 deletions
diff --git a/coreutils/cat.c b/coreutils/cat.c
index 7e35fa5..5f02233 100644
--- a/coreutils/cat.c
+++ b/coreutils/cat.c
@@ -168,9 +168,12 @@ static int catv(unsigned opts, char **argv)
int cat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int cat_main(int argc UNUSED_PARAM, char **argv)
{
+#if ENABLE_FEATURE_CATV || ENABLE_FEATURE_CATN
unsigned opts;
- opts = getopt32(argv, IF_FEATURE_CATV("^")
+ opts =
+#endif
+ getopt32(argv, IF_FEATURE_CATV("^")
/* -u is ignored ("unbuffered") */
IF_FEATURE_CATV("etvA")IF_FEATURE_CATN("nb")"u"
IF_FEATURE_CATV("\0" "Aetv" /* -A == -vet */)
diff --git a/coreutils/ls.c b/coreutils/ls.c
index a4e324b..4be4990 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -482,12 +482,11 @@ static NOINLINE unsigned display_single(const struct dnode *dn)
int opt;
#if ENABLE_FEATURE_LS_FILETYPES || ENABLE_FEATURE_LS_COLOR
struct stat statbuf;
- char append;
#endif
-
#if ENABLE_FEATURE_LS_FILETYPES
- append = append_char(dn->dn_mode);
+ char append = append_char(dn->dn_mode);
#endif
+
opt = option_mask32;
/* Do readlink early, so that if it fails, error message
diff --git a/coreutils/stat.c b/coreutils/stat.c
index dafbd4e..7ba3db1 100644
--- a/coreutils/stat.c
+++ b/coreutils/stat.c
@@ -759,10 +759,13 @@ int stat_main(int argc UNUSED_PARAM, char **argv)
IF_FEATURE_STAT_FORMAT(char *format = NULL;)
int i;
int ok;
- unsigned opts;
statfunc_ptr statfunc = do_stat;
+#if ENABLE_FEATURE_STAT_FILESYSTEM || ENABLE_SELINUX
+ unsigned opts;
- opts = getopt32(argv, "^"
+ opts =
+#endif
+ getopt32(argv, "^"
"tL"
IF_FEATURE_STAT_FILESYSTEM("f")
IF_SELINUX("Z")
diff --git a/coreutils/uname.c b/coreutils/uname.c
index 57039b1..7658096 100644
--- a/coreutils/uname.c
+++ b/coreutils/uname.c
@@ -127,11 +127,9 @@ int uname_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
{
uname_info_t uname_info;
IF_UNAME(const char *unknown_str = "unknown";)
- unsigned toprint;
-
- toprint = (1 << 4); /* "arch" = "uname -m" */
-
#if ENABLE_UNAME
+ unsigned toprint = (1 << 4); /* "arch" = "uname -m" */
+
if (!ENABLE_BB_ARCH || applet_name[0] == 'u') {
# if ENABLE_LONG_OPTS
static const char uname_longopts[] ALIGN1 =