From 8c89a671e8f9f3e3539a26d4b4a851a832f6c17e Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Mon, 20 Aug 2018 15:19:26 -0700 Subject: [PATCH] Address GCC 7 warnings --- src/daemon.c | 3 +++ src/mbpfan.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/daemon.c b/src/daemon.c index a4574e3..bd4a491 100644 --- a/src/daemon.c +++ b/src/daemon.c @@ -118,14 +118,17 @@ void signal_handler(int signal) case SIGTERM: syslog(LOG_WARNING, "Received SIGTERM signal."); cleanup_and_exit(EXIT_SUCCESS); + break; case SIGQUIT: syslog(LOG_WARNING, "Received SIGQUIT signal."); cleanup_and_exit(EXIT_SUCCESS); + break; case SIGINT: syslog(LOG_WARNING, "Received SIGINT signal."); cleanup_and_exit(EXIT_SUCCESS); + break; default: syslog(LOG_WARNING, "Unhandled signal (%d) %s", signal, strsignal(signal)); diff --git a/src/mbpfan.c b/src/mbpfan.c index 67958bc..4e20529 100644 --- a/src/mbpfan.c +++ b/src/mbpfan.c @@ -306,7 +306,7 @@ t_fans *retrieve_fans() } } - if (!fans_found > 0){ + if (fans_found == 0){ syslog(LOG_CRIT, "mbpfan could not detect any fan. Please contact the developer.\n"); printf("mbpfan could not detect any fan. Please contact the developer.\n"); exit(EXIT_FAILURE);