Address GCC 7 warnings

This commit is contained in:
Andrew Gaul 2018-08-20 15:19:26 -07:00
parent ddc219746f
commit 8c89a671e8
2 changed files with 4 additions and 1 deletions

View file

@ -118,14 +118,17 @@ void signal_handler(int signal)
case SIGTERM: case SIGTERM:
syslog(LOG_WARNING, "Received SIGTERM signal."); syslog(LOG_WARNING, "Received SIGTERM signal.");
cleanup_and_exit(EXIT_SUCCESS); cleanup_and_exit(EXIT_SUCCESS);
break;
case SIGQUIT: case SIGQUIT:
syslog(LOG_WARNING, "Received SIGQUIT signal."); syslog(LOG_WARNING, "Received SIGQUIT signal.");
cleanup_and_exit(EXIT_SUCCESS); cleanup_and_exit(EXIT_SUCCESS);
break;
case SIGINT: case SIGINT:
syslog(LOG_WARNING, "Received SIGINT signal."); syslog(LOG_WARNING, "Received SIGINT signal.");
cleanup_and_exit(EXIT_SUCCESS); cleanup_and_exit(EXIT_SUCCESS);
break;
default: default:
syslog(LOG_WARNING, "Unhandled signal (%d) %s", signal, strsignal(signal)); syslog(LOG_WARNING, "Unhandled signal (%d) %s", signal, strsignal(signal));

View file

@ -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"); 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"); printf("mbpfan could not detect any fan. Please contact the developer.\n");
exit(EXIT_FAILURE); exit(EXIT_FAILURE);