diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-12-12 16:30:20 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-12-12 16:30:20 +0100 |
commit | b6afcc78194aa0801544bc606b9562339c846eb4 (patch) | |
tree | 7e0bc1d3f16b226201ec8a997be8c916f9d27940 /shell/hush.c | |
parent | 4f13a7050787aadb402c9c47aae0ff778dbc2c8b (diff) | |
download | busybox-w32-b6afcc78194aa0801544bc606b9562339c846eb4.tar.gz busybox-w32-b6afcc78194aa0801544bc606b9562339c846eb4.tar.bz2 busybox-w32-b6afcc78194aa0801544bc606b9562339c846eb4.zip |
shell: suppress "unused var/func" warnings on some configs
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush.c')
-rw-r--r-- | shell/hush.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/shell/hush.c b/shell/hush.c index bcd4dffee..888be6e6e 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -1574,9 +1574,8 @@ static sighandler_t install_sighandler(int sig, sighandler_t handler) | |||
1574 | } | 1574 | } |
1575 | 1575 | ||
1576 | static void hush_exit(int exitcode) NORETURN; | 1576 | static void hush_exit(int exitcode) NORETURN; |
1577 | static void fflush_and__exit(void) NORETURN; | ||
1578 | static void restore_ttypgrp_and__exit(void) NORETURN; | ||
1579 | 1577 | ||
1578 | static void restore_ttypgrp_and__exit(void) NORETURN; | ||
1580 | static void restore_ttypgrp_and__exit(void) | 1579 | static void restore_ttypgrp_and__exit(void) |
1581 | { | 1580 | { |
1582 | /* xfunc has failed! die die die */ | 1581 | /* xfunc has failed! die die die */ |
@@ -1585,6 +1584,8 @@ static void restore_ttypgrp_and__exit(void) | |||
1585 | hush_exit(xfunc_error_retval); | 1584 | hush_exit(xfunc_error_retval); |
1586 | } | 1585 | } |
1587 | 1586 | ||
1587 | #if ENABLE_HUSH_JOB | ||
1588 | |||
1588 | /* Needed only on some libc: | 1589 | /* Needed only on some libc: |
1589 | * It was observed that on exit(), fgetc'ed buffered data | 1590 | * It was observed that on exit(), fgetc'ed buffered data |
1590 | * gets "unwound" via lseek(fd, -NUM, SEEK_CUR). | 1591 | * gets "unwound" via lseek(fd, -NUM, SEEK_CUR). |
@@ -1598,14 +1599,13 @@ static void restore_ttypgrp_and__exit(void) | |||
1598 | * and in `cmd` handling. | 1599 | * and in `cmd` handling. |
1599 | * If set as die_func(), this makes xfunc_die() exit via _exit(), not exit(): | 1600 | * If set as die_func(), this makes xfunc_die() exit via _exit(), not exit(): |
1600 | */ | 1601 | */ |
1602 | static void fflush_and__exit(void) NORETURN; | ||
1601 | static void fflush_and__exit(void) | 1603 | static void fflush_and__exit(void) |
1602 | { | 1604 | { |
1603 | fflush_all(); | 1605 | fflush_all(); |
1604 | _exit(xfunc_error_retval); | 1606 | _exit(xfunc_error_retval); |
1605 | } | 1607 | } |
1606 | 1608 | ||
1607 | #if ENABLE_HUSH_JOB | ||
1608 | |||
1609 | /* After [v]fork, in child: do not restore tty pgrp on xfunc death */ | 1609 | /* After [v]fork, in child: do not restore tty pgrp on xfunc death */ |
1610 | # define disable_restore_tty_pgrp_on_exit() (die_func = fflush_and__exit) | 1610 | # define disable_restore_tty_pgrp_on_exit() (die_func = fflush_and__exit) |
1611 | /* After [v]fork, in parent: restore tty pgrp on xfunc death */ | 1611 | /* After [v]fork, in parent: restore tty pgrp on xfunc death */ |