diff options
author | Rob Landley <rob@landley.net> | 2006-05-28 01:19:06 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2006-05-28 01:19:06 +0000 |
commit | c44bc986b738977c5cd9741d9752a41ac022602f (patch) | |
tree | 44562726c7e7ca0c936f6e77a5f29e31d3dec33a | |
parent | 3f78561d63290c53ca8bb3cd6314ca7357a617ee (diff) | |
download | busybox-w32-c44bc986b738977c5cd9741d9752a41ac022602f.tar.gz busybox-w32-c44bc986b738977c5cd9741d9752a41ac022602f.tar.bz2 busybox-w32-c44bc986b738977c5cd9741d9752a41ac022602f.zip |
Fix some warnings in allbareconfig.
-rw-r--r-- | coreutils/ls.c | 2 | ||||
-rw-r--r-- | util-linux/more.c | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/coreutils/ls.c b/coreutils/ls.c index 882eab8e7..3fe0c8dad 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c | |||
@@ -353,6 +353,8 @@ static void dfree(struct dnode **dnp, int nfiles) | |||
353 | } | 353 | } |
354 | free(dnp); /* free the array holding the dnode pointers */ | 354 | free(dnp); /* free the array holding the dnode pointers */ |
355 | } | 355 | } |
356 | #else | ||
357 | #define dfree(...) | ||
356 | #endif | 358 | #endif |
357 | 359 | ||
358 | static struct dnode **splitdnarray(struct dnode **dn, int nfiles, int which) | 360 | static struct dnode **splitdnarray(struct dnode **dn, int nfiles, int which) |
diff --git a/util-linux/more.c b/util-linux/more.c index beba64282..2ad1e797c 100644 --- a/util-linux/more.c +++ b/util-linux/more.c | |||
@@ -67,9 +67,6 @@ int more_main(int argc, char **argv) | |||
67 | int len, page_height; | 67 | int len, page_height; |
68 | int terminal_width; | 68 | int terminal_width; |
69 | int terminal_height; | 69 | int terminal_height; |
70 | #ifndef CONFIG_FEATURE_USE_TERMIOS | ||
71 | int cin_fileno; | ||
72 | #endif | ||
73 | 70 | ||
74 | argc--; | 71 | argc--; |
75 | argv++; | 72 | argv++; |
@@ -80,9 +77,9 @@ int more_main(int argc, char **argv) | |||
80 | cin = fopen(CURRENT_TTY, "r"); | 77 | cin = fopen(CURRENT_TTY, "r"); |
81 | if (!cin) | 78 | if (!cin) |
82 | cin = bb_xfopen(CONSOLE_DEV, "r"); | 79 | cin = bb_xfopen(CONSOLE_DEV, "r"); |
83 | cin_fileno = fileno(cin); | ||
84 | please_display_more_prompt = 2; | 80 | please_display_more_prompt = 2; |
85 | #ifdef CONFIG_FEATURE_USE_TERMIOS | 81 | #ifdef CONFIG_FEATURE_USE_TERMIOS |
82 | cin_fileno = fileno(cin); | ||
86 | getTermSettings(cin_fileno, &initial_settings); | 83 | getTermSettings(cin_fileno, &initial_settings); |
87 | new_settings = initial_settings; | 84 | new_settings = initial_settings; |
88 | new_settings.c_lflag &= ~ICANON; | 85 | new_settings.c_lflag &= ~ICANON; |
@@ -112,7 +109,7 @@ int more_main(int argc, char **argv) | |||
112 | 109 | ||
113 | please_display_more_prompt &= ~1; | 110 | please_display_more_prompt &= ~1; |
114 | 111 | ||
115 | get_terminal_width_height(cin_fileno, &terminal_width, &terminal_height); | 112 | get_terminal_width_height(fileno(cin), &terminal_width, &terminal_height); |
116 | if (terminal_height > 4) | 113 | if (terminal_height > 4) |
117 | terminal_height -= 2; | 114 | terminal_height -= 2; |
118 | if (terminal_width > 0) | 115 | if (terminal_width > 0) |