aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--watchdog.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 62231fb..5f7c715 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-CFLAGS = -O3
+CFLAGS = -O3 -Wall -Wextra
PREFIX = /usr/local
watchdog: watchdog.c
diff --git a/watchdog.c b/watchdog.c
index 12df687..0fe66f9 100644
--- a/watchdog.c
+++ b/watchdog.c
@@ -120,7 +120,7 @@ int main(int argc, char **argv)
size_t num_pids = 0;
char *dirptr = dirbuffer;
- for (size_t i = 0; i < n_dirent; i++) {
+ for (size_t i = 0; i < (size_t) n_dirent; i++) {
struct linux_dirent64 *d = (void*) dirptr;
int pid;
if ((d->d_type == DT_DIR || d->d_type == DT_UNKNOWN) && (pid = atoi(d->d_name))) {