bmon: Remove dead code and make sig_exit() static

Fixes sparse warnings:
bmon.c:36:5: warning: symbol 'do_quit' was not declared. Should it be static?
bmon.c:37:5: warning: symbol 'is_daemon' was not declared. Should it be static?
bmon.c:91:12: warning: symbol 'sig_int' was not declared. Should it be static?
bmon.c:98:6: warning: symbol 'sig_exit' was not declared. Should it be static?

Signed-off-by: Thomas Graf <tgraf@suug.ch>
This commit is contained in:
Thomas Graf 2015-12-16 14:04:14 +01:00
parent 0641291ad5
commit 753a9e09dd

View File

@ -33,8 +33,6 @@
#include <bmon/group.h> #include <bmon/group.h>
int start_time; int start_time;
int do_quit = 0;
int is_daemon = 0;
struct reader_timing rtiming; struct reader_timing rtiming;
@ -88,14 +86,7 @@ static void do_shutdown(void)
} }
} }
RETSIGTYPE sig_int(int unused) static void sig_exit(void)
{
if (do_quit)
exit(-1);
do_quit = 1;
}
void sig_exit(void)
{ {
do_shutdown(); do_shutdown();
} }
@ -361,9 +352,6 @@ int main(int argc, char *argv[])
output_post(); output_post();
} }
if (do_quit)
exit(0);
/* /*
* ST := Configured ST * ST := Configured ST
*/ */
@ -399,5 +387,4 @@ int main(int argc, char *argv[])
static void __init bmon_init(void) static void __init bmon_init(void)
{ {
atexit(&sig_exit); atexit(&sig_exit);
//signal(SIGINT, &sig_int);
} }