diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2019-01-06 20:12:16 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2019-01-06 20:12:16 +0100 |
commit | 4bdc914ff97df0cea8d2c7b42bf7f57d5ebb8dcb (patch) | |
tree | 1e856a1649322d890d5a5b1c066dfe5678004148 | |
parent | 2d9e09796342ab202e780a6cb613b532c7356aec (diff) | |
download | busybox-w32-4bdc914ff97df0cea8d2c7b42bf7f57d5ebb8dcb.tar.gz busybox-w32-4bdc914ff97df0cea8d2c7b42bf7f57d5ebb8dcb.tar.bz2 busybox-w32-4bdc914ff97df0cea8d2c7b42bf7f57d5ebb8dcb.zip |
build system: fix compiler warnings
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | Config.in | 2 | ||||
-rw-r--r-- | scripts/basic/split-include.c | 3 | ||||
-rw-r--r-- | scripts/kconfig/conf.c | 6 | ||||
-rw-r--r-- | scripts/kconfig/lxdialog/lxdialog.c | 2 | ||||
-rw-r--r-- | scripts/kconfig/mconf.c | 7 |
5 files changed, 13 insertions, 7 deletions
@@ -12,7 +12,7 @@ config HAVE_DOT_CONFIG | |||
12 | menu "Settings" | 12 | menu "Settings" |
13 | 13 | ||
14 | config DESKTOP | 14 | config DESKTOP |
15 | bool "Enable compatibility for full-blown desktop systems" | 15 | bool "Enable compatibility for full-blown desktop systems (8kb)" |
16 | default y | 16 | default y |
17 | help | 17 | help |
18 | Enable applet options and features which are not essential. | 18 | Enable applet options and features which are not essential. |
diff --git a/scripts/basic/split-include.c b/scripts/basic/split-include.c index e328788e2..791d142a8 100644 --- a/scripts/basic/split-include.c +++ b/scripts/basic/split-include.c | |||
@@ -131,7 +131,8 @@ int main(int argc, const char * argv []) | |||
131 | is_same = 0; | 131 | is_same = 0; |
132 | if ((fp_target = fopen(ptarget, "r")) != NULL) | 132 | if ((fp_target = fopen(ptarget, "r")) != NULL) |
133 | { | 133 | { |
134 | fgets(old_line, buffer_size, fp_target); | 134 | if (!fgets(old_line, buffer_size, fp_target)) |
135 | ERROR_EXIT(ptarget); | ||
135 | if (fclose(fp_target) != 0) | 136 | if (fclose(fp_target) != 0) |
136 | ERROR_EXIT(ptarget); | 137 | ERROR_EXIT(ptarget); |
137 | if (!strcmp(line, old_line)) | 138 | if (!strcmp(line, old_line)) |
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 57734b590..866a7c544 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c | |||
@@ -142,7 +142,8 @@ static void conf_askvalue(struct symbol *sym, const char *def) | |||
142 | check_stdin(); | 142 | check_stdin(); |
143 | case ask_all: | 143 | case ask_all: |
144 | fflush(stdout); | 144 | fflush(stdout); |
145 | fgets(line, 128, stdin); | 145 | if (!fgets(line, 128, stdin)) |
146 | exit(1); | ||
146 | return; | 147 | return; |
147 | case set_default: | 148 | case set_default: |
148 | printf("%s\n", def); | 149 | printf("%s\n", def); |
@@ -390,7 +391,8 @@ static int conf_choice(struct menu *menu) | |||
390 | check_stdin(); | 391 | check_stdin(); |
391 | case ask_all: | 392 | case ask_all: |
392 | fflush(stdout); | 393 | fflush(stdout); |
393 | fgets(line, 128, stdin); | 394 | if (!fgets(line, 128, stdin)) |
395 | exit(1); | ||
394 | strip(line); | 396 | strip(line); |
395 | if (line[0] == '?') { | 397 | if (line[0] == '?') { |
396 | printf("\n%s\n", menu->sym->help ? | 398 | printf("\n%s\n", menu->sym->help ? |
diff --git a/scripts/kconfig/lxdialog/lxdialog.c b/scripts/kconfig/lxdialog/lxdialog.c index 79f6c5fb5..5b8e3e947 100644 --- a/scripts/kconfig/lxdialog/lxdialog.c +++ b/scripts/kconfig/lxdialog/lxdialog.c | |||
@@ -189,7 +189,7 @@ int j_inputbox(const char *t, int ac, const char *const *av) | |||
189 | int ret = dialog_inputbox(t, av[2], atoi(av[3]), atoi(av[4]), | 189 | int ret = dialog_inputbox(t, av[2], atoi(av[3]), atoi(av[4]), |
190 | ac == 6 ? av[5] : (char *)NULL); | 190 | ac == 6 ? av[5] : (char *)NULL); |
191 | if (ret == 0) | 191 | if (ret == 0) |
192 | fprintf(stderr, dialog_input_result); | 192 | fprintf(stderr, "%s", dialog_input_result); |
193 | return ret; | 193 | return ret; |
194 | } | 194 | } |
195 | 195 | ||
diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c index adba1141b..c3a837a14 100644 --- a/scripts/kconfig/mconf.c +++ b/scripts/kconfig/mconf.c | |||
@@ -482,7 +482,8 @@ static int exec_conf(void) | |||
482 | 482 | ||
483 | *argptr++ = NULL; | 483 | *argptr++ = NULL; |
484 | 484 | ||
485 | pipe(pipefd); | 485 | if (pipe(pipefd)) |
486 | _exit(EXIT_FAILURE); | ||
486 | pid = fork(); | 487 | pid = fork(); |
487 | if (pid == 0) { | 488 | if (pid == 0) { |
488 | sigprocmask(SIG_SETMASK, &osset, NULL); | 489 | sigprocmask(SIG_SETMASK, &osset, NULL); |
@@ -846,9 +847,11 @@ static void conf(struct menu *menu) | |||
846 | static void show_textbox(const char *title, const char *text, int r, int c) | 847 | static void show_textbox(const char *title, const char *text, int r, int c) |
847 | { | 848 | { |
848 | int fd; | 849 | int fd; |
850 | int len = strlen(text); | ||
849 | 851 | ||
850 | fd = creat(".help.tmp", 0777); | 852 | fd = creat(".help.tmp", 0777); |
851 | write(fd, text, strlen(text)); | 853 | if (write(fd, text, len) != len) |
854 | exit(1); | ||
852 | close(fd); | 855 | close(fd); |
853 | show_file(".help.tmp", title, r, c); | 856 | show_file(".help.tmp", title, r, c); |
854 | unlink(".help.tmp"); | 857 | unlink(".help.tmp"); |