From bfe071e3ac625e8546de6444e89adc2a90655a63 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 26 Jul 2017 16:01:15 +0200 Subject: axwrapper: Remove unused code resulting in warning. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gcc -g -O2 -Wall -o axspawn axspawn.o access.o md5.o -lax25 -lutil gcc -DHAVE_CONFIG_H -I. -I.. -D_GNU_SOURCE -DAX25_SYSCONFDIR=\""/usr/local/etc/ax25/"\" -DAX25_LOCALSTATEDIR=\""/us r/local/var/ax25/"\" -g -O2 -Wall -MT axwrapper.o -MD -MP -MF .deps/axwrapper.Tpo -c -o axwrapper.o axwrapper.c axwrapper.c:49:13: warning: ‘sigchld_handler’ defined but not used [-Wunused-function] static void sigchld_handler(int sig) ^~~~~~~~~~~~~~~ Since 71918b7d4e95 ("axwrapper: Mark functions sigchld_handler and convert_{cr_lf,lf_cr} static.") made sigchld_handler() static gcc was warning about the function being unused. No point in keeping this around; SIGCHLD is perfectly fine. Fixes: 71918b7d4e95 ("axwrapper: Mark functions sigchld_handler and convert_{cr_lf,lf_cr} static.") Signed-off-by: Ralf Baechle --- ax25/axwrapper.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'ax25') diff --git a/ax25/axwrapper.c b/ax25/axwrapper.c index ad2995a..e9dcff4 100644 --- a/ax25/axwrapper.c +++ b/ax25/axwrapper.c @@ -46,12 +46,6 @@ #define PERROR(s) fprintf(stderr, "*** %s: %s\r", (s), strerror(errno)) #define USAGE() fputs("Usage: axwrapper [-p ] ...\r", stderr) -static void sigchld_handler(int sig) -{ - /* fprintf(stderr, "Caught SIGCHLD, exiting...\r"); */ - exit(0); -} - static void convert_cr_lf(unsigned char *buf, int len) { while (len-- > 0) { @@ -118,7 +112,6 @@ int main(int argc, char **argv) exit(1); } - /* signal(SIGCHLD, sigchld_handler); */ signal(SIGCHLD, SIG_IGN); pid = fork(); -- cgit v1.2.3