2025-05-07 04:05 ftp://ftp.de.debian.org/debian/pool/main/p/pngphoon/pngphoon_1.3.orig.tar.bz2 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-59-generic-x86_64-with-glibc2.39 python: 3.12.3 client-version: 1.3.67 compiler: g++ (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0 cppcheck: head 2.17.0 head-info: 8e656e5 (2025-05-06 23:42:00 +0200) count: 34 31 elapsed-time: 2.5 2.1 head-timing-info: old-timing-info: head results: pngphoon-1.3/fail.c:14:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] pngphoon-1.3/fail.c:28:14: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] pngphoon-1.3/image.c:16:48: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable png_bytep [valueFlowBailoutIncompleteVar] pngphoon-1.3/image.c:32:4: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg] pngphoon-1.3/image.c:12:4: warning: If memory allocation fails, then there is a possible null pointer dereference: image [nullPointerOutOfMemory] pngphoon-1.3/image.c:11:28: note: Assuming allocation function fails pngphoon-1.3/image.c:11:12: note: Assignment 'image=(struct image_t*)malloc(sizeof(struct image_t))', assigned value is 0 pngphoon-1.3/image.c:12:4: note: Null pointer dereference pngphoon-1.3/image.c:13:4: warning: If memory allocation fails, then there is a possible null pointer dereference: image [nullPointerOutOfMemory] pngphoon-1.3/image.c:11:28: note: Assuming allocation function fails pngphoon-1.3/image.c:11:12: note: Assignment 'image=(struct image_t*)malloc(sizeof(struct image_t))', assigned value is 0 pngphoon-1.3/image.c:13:4: note: Null pointer dereference pngphoon-1.3/image.c:14:4: warning: If memory allocation fails, then there is a possible null pointer dereference: image [nullPointerOutOfMemory] pngphoon-1.3/image.c:11:28: note: Assuming allocation function fails pngphoon-1.3/image.c:11:12: note: Assignment 'image=(struct image_t*)malloc(sizeof(struct image_t))', assigned value is 0 pngphoon-1.3/image.c:14:4: note: Null pointer dereference pngphoon-1.3/image.c:15:4: warning: If memory allocation fails, then there is a possible null pointer dereference: image [nullPointerOutOfMemory] pngphoon-1.3/image.c:11:28: note: Assuming allocation function fails pngphoon-1.3/image.c:11:12: note: Assignment 'image=(struct image_t*)malloc(sizeof(struct image_t))', assigned value is 0 pngphoon-1.3/image.c:15:4: note: Null pointer dereference pngphoon-1.3/image.c:15:39: warning: If memory allocation fails, then there is a possible null pointer dereference: image [nullPointerOutOfMemory] pngphoon-1.3/image.c:11:28: note: Assuming allocation function fails pngphoon-1.3/image.c:11:12: note: Assignment 'image=(struct image_t*)malloc(sizeof(struct image_t))', assigned value is 0 pngphoon-1.3/image.c:15:39: note: Null pointer dereference pngphoon-1.3/image.c:16:4: warning: If memory allocation fails, then there is a possible null pointer dereference: image [nullPointerOutOfMemory] pngphoon-1.3/image.c:11:28: note: Assuming allocation function fails pngphoon-1.3/image.c:11:12: note: Assignment 'image=(struct image_t*)malloc(sizeof(struct image_t))', assigned value is 0 pngphoon-1.3/image.c:16:4: note: Null pointer dereference pngphoon-1.3/image.c:20:7: warning: If memory allocation fails, then there is a possible null pointer dereference: image [nullPointerOutOfMemory] pngphoon-1.3/image.c:11:28: note: Assuming allocation function fails pngphoon-1.3/image.c:11:12: note: Assignment 'image=(struct image_t*)malloc(sizeof(struct image_t))', assigned value is 0 pngphoon-1.3/image.c:20:7: note: Null pointer dereference pngphoon-1.3/image.c:20:25: warning: If memory allocation fails, then there is a possible null pointer dereference: image [nullPointerOutOfMemory] pngphoon-1.3/image.c:11:28: note: Assuming allocation function fails pngphoon-1.3/image.c:11:12: note: Assignment 'image=(struct image_t*)malloc(sizeof(struct image_t))', assigned value is 0 pngphoon-1.3/image.c:20:25: note: Null pointer dereference pngphoon-1.3/image.c:20:46: warning: If memory allocation fails, then there is a possible null pointer dereference: image [nullPointerOutOfMemory] pngphoon-1.3/image.c:11:28: note: Assuming allocation function fails pngphoon-1.3/image.c:11:12: note: Assignment 'image=(struct image_t*)malloc(sizeof(struct image_t))', assigned value is 0 pngphoon-1.3/image.c:20:46: note: Null pointer dereference pngphoon-1.3/main.c:100:4: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable opterr [valueFlowBailoutIncompleteVar] pngphoon-1.3/main.c:16:10: style: Variable 'base' can be declared as pointer to const [constVariablePointer] pngphoon-1.3/main.c:88:18: style: Variable 'bgcolor' can be declared as pointer to const [constVariablePointer] pngphoon-1.3/main.c:89:18: style: Variable 'fgcolor' can be declared as pointer to const [constVariablePointer] pngphoon-1.3/main.c:76:11: warning: Uninitialized variable: retval [uninitvar] pngphoon-1.3/main.c:48:8: note: Assuming condition is true pngphoon-1.3/main.c:76:11: note: Uninitialized variable: retval pngphoon-1.3/moon.c:54:4: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg] pngphoon-1.3/moon.c:42:4: warning: If memory allocation fails, then there is a possible null pointer dereference: moondata [nullPointerOutOfMemory] pngphoon-1.3/moon.c:41:30: note: Assuming allocation function fails pngphoon-1.3/moon.c:41:15: note: Assignment 'moondata=(struct moon_t*)malloc(sizeof(struct moon_t))', assigned value is 0 pngphoon-1.3/moon.c:42:4: note: Null pointer dereference pngphoon-1.3/moon.c:43:4: warning: If memory allocation fails, then there is a possible null pointer dereference: moondata [nullPointerOutOfMemory] pngphoon-1.3/moon.c:41:30: note: Assuming allocation function fails pngphoon-1.3/moon.c:41:15: note: Assignment 'moondata=(struct moon_t*)malloc(sizeof(struct moon_t))', assigned value is 0 pngphoon-1.3/moon.c:43:4: note: Null pointer dereference pngphoon-1.3/moon.c:44:4: warning: If memory allocation fails, then there is a possible null pointer dereference: moondata [nullPointerOutOfMemory] pngphoon-1.3/moon.c:41:30: note: Assuming allocation function fails pngphoon-1.3/moon.c:41:15: note: Assignment 'moondata=(struct moon_t*)malloc(sizeof(struct moon_t))', assigned value is 0 pngphoon-1.3/moon.c:44:4: note: Null pointer dereference pngphoon-1.3/moon.c:45:4: warning: If memory allocation fails, then there is a possible null pointer dereference: moondata [nullPointerOutOfMemory] pngphoon-1.3/moon.c:41:30: note: Assuming allocation function fails pngphoon-1.3/moon.c:41:15: note: Assignment 'moondata=(struct moon_t*)malloc(sizeof(struct moon_t))', assigned value is 0 pngphoon-1.3/moon.c:45:4: note: Null pointer dereference pngphoon-1.3/moon.c:58:53: style:inconclusive: Function 'mooncopy' argument 3 names different: declaration 'x' definition 'cx'. [funcArgNamesDifferent] pngphoon-1.3/moon.h:20:54: note: Function 'mooncopy' argument 3 names different: declaration 'x' definition 'cx'. pngphoon-1.3/moon.c:58:53: note: Function 'mooncopy' argument 3 names different: declaration 'x' definition 'cx'. pngphoon-1.3/moon.c:58:61: style:inconclusive: Function 'mooncopy' argument 4 names different: declaration 'y' definition 'cy'. [funcArgNamesDifferent] pngphoon-1.3/moon.h:20:61: note: Function 'mooncopy' argument 4 names different: declaration 'y' definition 'cy'. pngphoon-1.3/moon.c:58:61: note: Function 'mooncopy' argument 4 names different: declaration 'y' definition 'cy'. pngphoon-1.3/moon.c:72:19: style: Variable 'y' is assigned a value that is never used. [unreadVariable] pngphoon-1.3/phase.c:65:31: style: Parameter 't' can be declared as pointer to const [constParameterPointer] pngphoon-1.3/pngwrite.c:17:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdout [valueFlowBailoutIncompleteVar] pngphoon-1.3/stars.c:33:25: style: Parameter 'image' can be declared as pointer to const [constParameterPointer] pngphoon-1.3/tws.c:72:9: portability: Non reentrant function 'localtime' called. For threadsafe applications it is recommended to use the reentrant replacement function 'localtime_r'. [prohibitedlocaltimeCalled] pngphoon-1.3/tws.c:84:4: style: Obsolescent function 'ftime' called. It is recommended to use 'time', 'gettimeofday' or 'clock_gettime' instead. [prohibitedftimeCalled] pngphoon-1.3/tws.c:46:10: style: Variable 'phoontime' can be declared as pointer to const [constVariablePointer] pngphoon-1.3/tws.c:60:31: style: Parameter 'clock' can be declared as pointer to const [constParameterPointer] pngphoon-1.3/tws.c:62:21: style: Variable 'tm' can be declared as pointer to const [constVariablePointer] diff: head pngphoon-1.3/image.c:15:39: warning: If memory allocation fails, then there is a possible null pointer dereference: image [nullPointerOutOfMemory] pngphoon-1.3/image.c:11:28: note: Assuming allocation function fails pngphoon-1.3/image.c:11:12: note: Assignment 'image=(struct image_t*)malloc(sizeof(struct image_t))', assigned value is 0 pngphoon-1.3/image.c:15:39: note: Null pointer dereference head pngphoon-1.3/image.c:20:25: warning: If memory allocation fails, then there is a possible null pointer dereference: image [nullPointerOutOfMemory] pngphoon-1.3/image.c:11:28: note: Assuming allocation function fails pngphoon-1.3/image.c:11:12: note: Assignment 'image=(struct image_t*)malloc(sizeof(struct image_t))', assigned value is 0 pngphoon-1.3/image.c:20:25: note: Null pointer dereference head pngphoon-1.3/image.c:20:46: warning: If memory allocation fails, then there is a possible null pointer dereference: image [nullPointerOutOfMemory] pngphoon-1.3/image.c:11:28: note: Assuming allocation function fails pngphoon-1.3/image.c:11:12: note: Assignment 'image=(struct image_t*)malloc(sizeof(struct image_t))', assigned value is 0 pngphoon-1.3/image.c:20:46: note: Null pointer dereference DONE