]> Projects (at) Tadryanom (dot) Me - AdrOS.git/commitdiff
build: fix analyzer target and scan-build warning
authorTulio A M Mendes <[email protected]>
Sat, 6 Jun 2026 17:54:38 +0000 (14:54 -0300)
committerTulio A M Mendes <[email protected]>
Sat, 6 Jun 2026 17:54:38 +0000 (14:54 -0300)
Makefile
src/kernel/fs.c

index c74c6dfeb6cbbc87793ee768d40be7ccdd51aedb..7980ce8483062dce71b10fb2aa37f6d7276c9d86 100644 (file)
--- 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..."
index b80021602bc7f8dac9f0d4e679d049ef6b5b7d04..9ef5b4b26df7397f3ae8f3675e018f9874d05e2b 100644 (file)
@@ -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++; }