2026-05-03 05:53 ftp://ftp.de.debian.org/debian/pool/main/libp/libphysfs/libphysfs_3.2.0.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --inconclusive --enable=style,information --inline-suppr --template=daca2 --disable=missingInclude --suppress=unmatchedSuppression --check-library --debug-warnings --suppress=autoNoType --suppress=valueFlowBailout --suppress=bailoutUninitVar --suppress=symbolDatabaseWarning --suppress=normalCheckLevelConditionExpressions -D__GNUC__ --platform=unix64 -j1 platform: Linux-6.8.0-111-generic-x86_64-with-glibc2.39 python: 3.12.3 client-version: 1.3.70 compiler: g++ (Ubuntu 14.2.0-4ubuntu2~24.04.1) 14.2.0 cppcheck: head 2.20.0 head-info: e5c4a73 (2026-05-01 11:10:43 +0200) count: 31 32 elapsed-time: 0.8 0.7 head-timing-info: old-timing-info: head results: icculus-physfs-eb3383b/extras/globbing.c:104:36: style: Parameter '_d' can be declared as pointer to const. However it seems that 'wildcardCallback' is a callback function, if '_d' is declared with const you might also need to cast function pointer(s). [constParameterCallback] icculus-physfs-eb3383b/extras/globbing.c:124:40: note: You might need to cast the function pointer here icculus-physfs-eb3383b/extras/globbing.c:104:36: note: Parameter '_d' can be declared as pointer to const icculus-physfs-eb3383b/extras/physfshttpd.c:208:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PHYSFS_FILETYPE_DIRECTORY [valueFlowBailoutIncompleteVar] icculus-physfs-eb3383b/extras/physfshttpd.c:303:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable AF_INET [valueFlowBailoutIncompleteVar] icculus-physfs-eb3383b/extras/physfshttpd.c:388:54: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] icculus-physfs-eb3383b/extras/physfshttpd.c:294:12: portability: Non reentrant function 'getprotobyname' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getprotobyname_r'. [prohibitedgetprotobynameCalled] icculus-physfs-eb3383b/extras/physfshttpd.c:87:62: style: Parameter 'buf' can be declared as pointer to const [constParameterPointer] icculus-physfs-eb3383b/extras/physfshttpd.c:260:59: style: Parameter 'addr' can be declared as pointer to const [constParameterPointer] icculus-physfs-eb3383b/extras/physfshttpd.c:292:22: style: Variable 'prot' can be declared as pointer to const [constVariablePointer] icculus-physfs-eb3383b/extras/physfsunpack.c:32:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] icculus-physfs-eb3383b/extras/physfsunpack.c:147:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] icculus-physfs-eb3383b/src/physfs_platforms.h:76:4: error: #error Unknown platform. [preprocessorErrorDirective] icculus-physfs-eb3383b/test/test_physfs.c:221:83: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] icculus-physfs-eb3383b/test/test_physfs.c:575:81: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable RAND_MAX [valueFlowBailoutIncompleteVar] icculus-physfs-eb3383b/test/test_physfs.c:843:35: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PHYSFS_FILETYPE_DIRECTORY [valueFlowBailoutIncompleteVar] icculus-physfs-eb3383b/test/test_physfs.c:862:35: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PHYSFS_FILETYPE_SYMLINK [valueFlowBailoutIncompleteVar] icculus-physfs-eb3383b/test/test_physfs.c:902:40: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] icculus-physfs-eb3383b/test/test_physfs.c:1052:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] icculus-physfs-eb3383b/test/test_physfs.c:1296:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PHYSFS_FILETYPE_REGULAR [valueFlowBailoutIncompleteVar] icculus-physfs-eb3383b/test/test_physfs.c:1593:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] icculus-physfs-eb3383b/test/test_physfs.c:1602:16: warning: If memory allocation fails, then there is a possible null pointer dereference: buf [nullPointerOutOfMemory] icculus-physfs-eb3383b/test/test_physfs.c:1601:30: note: Assuming allocation function fails icculus-physfs-eb3383b/test/test_physfs.c:1601:15: note: Assignment 'buf=(char*)malloc(512)', assigned value is 0 icculus-physfs-eb3383b/test/test_physfs.c:1602:16: note: Null pointer dereference icculus-physfs-eb3383b/test/test_physfs.c:970:15: style: Local variable 'ptr' shadows outer variable [shadowVariable] icculus-physfs-eb3383b/test/test_physfs.c:927:11: note: Shadowed declaration icculus-physfs-eb3383b/test/test_physfs.c:970:15: note: Shadow variable icculus-physfs-eb3383b/test/test_physfs.c:81:27: style: Parameter 'args' can be declared as pointer to const. However it seems that 'cmd_quit' is a callback function, if 'args' is declared with const you might also need to cast function pointer(s). [constParameterCallback] icculus-physfs-eb3383b/test/test_physfs.c:1350:25: note: You might need to cast the function pointer here icculus-physfs-eb3383b/test/test_physfs.c:81:27: note: Parameter 'args' can be declared as pointer to const icculus-physfs-eb3383b/test/test_physfs.c:104:29: style: Parameter 'args' can be declared as pointer to const. However it seems that 'cmd_deinit' is a callback function, if 'args' is declared with const you might also need to cast function pointer(s). [constParameterCallback] icculus-physfs-eb3383b/test/test_physfs.c:1353:25: note: You might need to cast the function pointer here icculus-physfs-eb3383b/test/test_physfs.c:104:29: note: Parameter 'args' can be declared as pointer to const icculus-physfs-eb3383b/test/test_physfs.c:384:32: style: Parameter 'args' can be declared as pointer to const. However it seems that 'cmd_getdirsep' is a callback function, if 'args' is declared with const you might also need to cast function pointer(s). [constParameterCallback] icculus-physfs-eb3383b/test/test_physfs.c:1363:25: note: You might need to cast the function pointer here icculus-physfs-eb3383b/test/test_physfs.c:384:32: note: Parameter 'args' can be declared as pointer to const icculus-physfs-eb3383b/test/test_physfs.c:391:35: style: Parameter 'args' can be declared as pointer to const. However it seems that 'cmd_getlasterror' is a callback function, if 'args' is declared with const you might also need to cast function pointer(s). [constParameterCallback] icculus-physfs-eb3383b/test/test_physfs.c:1362:25: note: You might need to cast the function pointer here icculus-physfs-eb3383b/test/test_physfs.c:391:35: note: Parameter 'args' can be declared as pointer to const icculus-physfs-eb3383b/test/test_physfs.c:440:33: style: Parameter 'args' can be declared as pointer to const. However it seems that 'cmd_getbasedir' is a callback function, if 'args' is declared with const you might also need to cast function pointer(s). [constParameterCallback] icculus-physfs-eb3383b/test/test_physfs.c:1366:25: note: You might need to cast the function pointer here icculus-physfs-eb3383b/test/test_physfs.c:440:33: note: Parameter 'args' can be declared as pointer to const icculus-physfs-eb3383b/test/test_physfs.c:447:33: style: Parameter 'args' can be declared as pointer to const. However it seems that 'cmd_getuserdir' is a callback function, if 'args' is declared with const you might also need to cast function pointer(s). [constParameterCallback] icculus-physfs-eb3383b/test/test_physfs.c:1367:25: note: You might need to cast the function pointer here icculus-physfs-eb3383b/test/test_physfs.c:447:33: note: Parameter 'args' can be declared as pointer to const icculus-physfs-eb3383b/test/test_physfs.c:467:34: style: Parameter 'args' can be declared as pointer to const. However it seems that 'cmd_getwritedir' is a callback function, if 'args' is declared with const you might also need to cast function pointer(s). [constParameterCallback] icculus-physfs-eb3383b/test/test_physfs.c:1369:25: note: You might need to cast the function pointer here icculus-physfs-eb3383b/test/test_physfs.c:467:34: note: Parameter 'args' can be declared as pointer to const icculus-physfs-eb3383b/test/test_physfs.c:1252:15: style: Variable 'str' can be declared as pointer to const [constVariablePointer] icculus-physfs-eb3383b/test/test_physfs.c:1404:27: style: Parameter 'args' can be declared as pointer to const. However it seems that 'cmd_help' is a callback function, if 'args' is declared with const you might also need to cast function pointer(s). [constParameterCallback] icculus-physfs-eb3383b/test/test_physfs.c:1351:25: note: You might need to cast the function pointer here icculus-physfs-eb3383b/test/test_physfs.c:1404:27: note: Parameter 'args' can be declared as pointer to const icculus-physfs-eb3383b/test/test_physfs.c:1454:34: style: Parameter 'complete_cmd' can be declared as pointer to const [constParameterPointer] diff: 2.20.0 icculus-physfs-eb3383b/extras/physfshttpd.c:283:1: error: Memory leak: args.addr [memleak] DONE