aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLizzy Fleckenstein <lizzy@vlhl.dev>2026-04-01 20:46:52 +0200
committerLizzy Fleckenstein <lizzy@vlhl.dev>2026-04-01 20:46:52 +0200
commitf8b0bd66630e9beae53d943a08c07052390b8ece (patch)
tree940215133f41d3565b90de9b2fb54c54312c29b9
parentd78242bd5e0028431bd983f7a48e74ecad6ee4dd (diff)
downloadburstdog-f8b0bd66630e9beae53d943a08c07052390b8ece.tar.xz
add -Wall -Wextra
-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))) {