2025-11-18 22:39 ftp://ftp.de.debian.org/debian/pool/main/q/qiv/qiv_3.0.2.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --library=gtk --library=motif --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 -j4 platform: Linux-6.12.57+deb13-amd64-x86_64-with-glibc2.41 python: 3.13.5 client-version: 1.3.67 compiler: g++ (Debian 14.2.0-19) 14.2.0 cppcheck: head 2.18.0 head-info: 1ca1246 (2025-11-18 18:56:39 +0100) count: 58 57 elapsed-time: 0.4 0.4 head-timing-info: old-timing-info: head results: qiv/main.c:119:43: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GdkRectangle [valueFlowBailoutIncompleteVar] qiv/main.c:282:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_PRIORITY_DEFAULT_IDLE [valueFlowBailoutIncompleteVar] qiv/main.c:280:40: style: Parameter 'dummy' can be declared as pointer to const. However it seems that 'qiv_timer_restart' is a callback function, if 'dummy' is declared with const you might also need to cast function pointer(s). [constParameterCallback] qiv/main.c:284:22: note: You might need to cast the function pointer here qiv/main.c:280:40: note: Parameter 'dummy' can be declared as pointer to const qiv/main.c:326:9: style: Variable 'extn' can be declared as pointer to const [constVariablePointer] qiv/lib/getopt.c:630:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] qiv/event.c:29:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GDK_POINTER_MOTION_HINT_MASK [valueFlowBailoutIncompleteVar] qiv/event.c:35:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GDK_POINTER_MOTION_HINT_MASK [valueFlowBailoutIncompleteVar] qiv/event.c:67:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GDK_CURRENT_TIME [valueFlowBailoutIncompleteVar] qiv/event.c:86:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GDK_CURRENT_TIME [valueFlowBailoutIncompleteVar] qiv/event.c:113:43: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable width [valueFlowBailoutIncompleteVar] qiv/event.c:150:32: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable width [valueFlowBailoutIncompleteVar] qiv/event.c:315:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GDK_BUTTON_RELEASE [valueFlowBailoutIncompleteVar] qiv/image.c:137:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] qiv/image.c:181:47: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable width [valueFlowBailoutIncompleteVar] qiv/image.c:242:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GDK_WINDOW_TOPLEVEL [valueFlowBailoutIncompleteVar] qiv/image.c:357:69: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GDK_INTERP_BILINEAR [valueFlowBailoutIncompleteVar] qiv/image.c:526:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] qiv/image.c:532:42: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable width [valueFlowBailoutIncompleteVar] qiv/image.c:579:77: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable width [valueFlowBailoutIncompleteVar] qiv/image.c:704:22: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GDK_GRAVITY_STATIC [valueFlowBailoutIncompleteVar] qiv/image.c:1070:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GDK_WINDOW_TOPLEVEL [valueFlowBailoutIncompleteVar] qiv/image.c:1149:34: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable width [valueFlowBailoutIncompleteVar] qiv/options.c:324:83: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] qiv/event.c:165:19: style: Array index 'i' is used before limits check. [arrayIndexThenCheck] qiv/event.c:190:19: style: Array index 'i' is used before limits check. [arrayIndexThenCheck] qiv/event.c:677:28: style: Variable 'exit_slideshow' is reassigned a value before the old one has been used. 'break;' missing? [redundantAssignInSwitch] qiv/event.c:663:28: note: $symbol is assigned qiv/event.c:677:28: note: $symbol is overwritten qiv/event.c:206:9: style: Local variable 'i' shadows outer variable [shadowVariable] qiv/event.c:139:33: note: Shadowed declaration qiv/event.c:206:9: note: Shadow variable qiv/utils.c:41:45: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PATH_MAX [valueFlowBailoutIncompleteVar] qiv/utils.c:161:80: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable BUFSIZ [valueFlowBailoutIncompleteVar] qiv/utils.c:334:34: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable WNOHANG [valueFlowBailoutIncompleteVar] qiv/utils.c:628:34: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable RAND_MAX [valueFlowBailoutIncompleteVar] qiv/utils.c:692:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdin [valueFlowBailoutIncompleteVar] qiv/utils.c:734:17: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] qiv/image.c:38:16: style: Variable 'pixbuf' can be declared as pointer to const [constVariablePointer] qiv/image.c:39:14: style: Variable 'pixeldata' can be declared as pointer to const [constVariablePointer] qiv/image.c:38:16: style: Variable 'pixbuf' is assigned a value that is never used. [unreadVariable] qiv/image.c:39:14: style: Variable 'pixeldata' is assigned a value that is never used. [unreadVariable] qiv/image.c:40:9: style: Unused variable: pb_w [unusedVariable] qiv/image.c:40:15: style: Unused variable: pb_h [unusedVariable] qiv/image.c:41:18: style: Variable 'gdk_orientation' is assigned a value that is never used. [unreadVariable] qiv/options.c:174:38: style: Variable 'ep2' can be declared as pointer to const [constVariablePointer] qiv/lib/getopt.c:723:11: style: Variable 'temp' can be declared as pointer to const [constVariablePointer] qiv/xmalloc.c:24:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] qiv/xmalloc.c:41:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] qiv/xmalloc.c:65:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] qiv/utils.c:205:5: warning:inconclusive: The buffer 'dstfilebak' may not be null-terminated after the call to strncpy(). [terminateStrncpy] qiv/utils.c:219:19: warning: Either the condition 'fdi==-1' is redundant or read() argument nr 1 can have invalid value. The value is -1 but the valid values are '0:'. [invalidFunctionArg] qiv/utils.c:216:10: note: Assuming that condition 'fdi==-1' is not redundant qiv/utils.c:219:19: note: Invalid argument qiv/utils.c:673:9: warning: If memory allocation fails, then there is a possible null pointer dereference: image_names [nullPointerOutOfMemory] qiv/utils.c:669:42: note: Assuming allocation function fails qiv/utils.c:669:27: note: Assignment 'image_names=(char**)xmalloc(max_image_cnt*sizeof(char*))', assigned value is 0 qiv/utils.c:673:9: note: Null pointer dereference qiv/utils.c:366:17: error: If memory allocation fails: pointer addition with NULL pointer. [nullPointerArithmeticOutOfMemory] qiv/utils.c:365:25: note: Assuming allocation function fails qiv/utils.c:365:25: note: Assignment 'newfilename=strdup(lines[0])', assigned value is 0 qiv/utils.c:366:17: note: Null pointer addition qiv/utils.c:333:21: style: Local variable 'q' shadows outer argument [shadowArgument] qiv/utils.c:282:29: note: Shadowed declaration qiv/utils.c:333:21: note: Shadow variable qiv/utils.c:40:15: style: Variable 'ptr2' can be declared as pointer to const [constVariablePointer] qiv/utils.c:160:9: style: Variable 'ptr' can be declared as pointer to const [constVariablePointer] qiv/utils.c:282:38: style: Parameter 'n' can be declared as pointer to const [constParameterPointer] qiv/utils.c:401:23: style: Parameter 'cmd' can be declared as pointer to const [constParameterPointer] qiv/utils.c:502:18: style: Parameter 'name' can be declared as pointer to const [constParameterPointer] qiv/utils.c:512:22: style: Parameter 'name' can be declared as pointer to const [constParameterPointer] qiv/utils.c:643:18: style: Variable 'entry' can be declared as pointer to const [constVariablePointer] qiv/utils.c:786:54: style: Parameter 'name' can be declared as pointer to const [constParameterPointer] diff: head qiv/options.c:174:38: style: Variable 'ep2' can be declared as pointer to const [constVariablePointer] DONE