From: Tulio A M Mendes Date: Sat, 6 Jun 2026 17:54:38 +0000 (-0300) Subject: build: fix analyzer target and scan-build warning X-Git-Url: https://projects.tadryanom.me/?a=commitdiff_plain;h=b07fcc46e6c48509c840db14cb169f0a0aca0596;p=AdrOS.git build: fix analyzer target and scan-build warning --- diff --git a/Makefile b/Makefile index c74c6dfe..7980ce84 100644 --- a/Makefile +++ b/Makefile @@ -336,7 +336,7 @@ sparse: @echo "[SPARSE] Done." # GCC -fanalyzer: interprocedural static analysis (use-after-free, NULL deref, etc) -ANALYZER_FLAGS := -m32 -ffreestanding -fanalyzer -fsyntax-only -Iinclude -O2 -Wno-cpp +ANALYZER_FLAGS := -m32 -ffreestanding -fanalyzer -fsyntax-only -Iinclude -Iinclude/net -Ithird_party/lwip/src/include -O2 -Wno-cpp analyzer: @echo "[ANALYZER] Running gcc -fanalyzer on $(words $(SPARSE_SRCS)) files..." diff --git a/src/kernel/fs.c b/src/kernel/fs.c index b8002160..9ef5b4b2 100644 --- a/src/kernel/fs.c +++ b/src/kernel/fs.c @@ -538,9 +538,8 @@ int vfs_mkdirp(const char* path) { /* Skip leading '/' */ char* p = tmp + 1; - char* slash; - while ((slash = p) && *p) { + while (*p) { /* Find next '/' */ while (*p && *p != '/') p++; if (*p == '/') { *p = '\0'; p++; }