summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley2006-05-28 01:19:06 +0000
committerRob Landley2006-05-28 01:19:06 +0000
commitc44bc986b738977c5cd9741d9752a41ac022602f (patch)
tree44562726c7e7ca0c936f6e77a5f29e31d3dec33a
parent3f78561d63290c53ca8bb3cd6314ca7357a617ee (diff)
downloadbusybox-c44bc986b738977c5cd9741d9752a41ac022602f.zip
busybox-c44bc986b738977c5cd9741d9752a41ac022602f.tar.gz
Fix some warnings in allbareconfig.
-rw-r--r--coreutils/ls.c2
-rw-r--r--util-linux/more.c7
2 files changed, 4 insertions, 5 deletions
diff --git a/coreutils/ls.c b/coreutils/ls.c
index 882eab8..3fe0c8d 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -353,6 +353,8 @@ static void dfree(struct dnode **dnp, int nfiles)
}
free(dnp); /* free the array holding the dnode pointers */
}
+#else
+#define dfree(...)
#endif
static struct dnode **splitdnarray(struct dnode **dn, int nfiles, int which)
diff --git a/util-linux/more.c b/util-linux/more.c
index beba642..2ad1e79 100644
--- a/util-linux/more.c
+++ b/util-linux/more.c
@@ -67,9 +67,6 @@ int more_main(int argc, char **argv)
int len, page_height;
int terminal_width;
int terminal_height;
-#ifndef CONFIG_FEATURE_USE_TERMIOS
- int cin_fileno;
-#endif
argc--;
argv++;
@@ -80,9 +77,9 @@ int more_main(int argc, char **argv)
cin = fopen(CURRENT_TTY, "r");
if (!cin)
cin = bb_xfopen(CONSOLE_DEV, "r");
- cin_fileno = fileno(cin);
please_display_more_prompt = 2;
#ifdef CONFIG_FEATURE_USE_TERMIOS
+ cin_fileno = fileno(cin);
getTermSettings(cin_fileno, &initial_settings);
new_settings = initial_settings;
new_settings.c_lflag &= ~ICANON;
@@ -112,7 +109,7 @@ int more_main(int argc, char **argv)
please_display_more_prompt &= ~1;
- get_terminal_width_height(cin_fileno, &terminal_width, &terminal_height);
+ get_terminal_width_height(fileno(cin), &terminal_width, &terminal_height);
if (terminal_height > 4)
terminal_height -= 2;
if (terminal_width > 0)