2024-04-23 09:06 ftp://ftp.de.debian.org/debian/pool/main/x/xserver-xorg-video-dummy/xserver-xorg-video-dummy_0.4.0.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=motif --check-library --inconclusive --enable=style,information --inline-suppr --disable=missingInclude --suppress=unmatchedSuppression --template=daca2 --debug-warnings --suppress=autoNoType --suppress=valueFlowBailout --suppress=bailoutUninitVar --suppress=symbolDatabaseWarning -D__GNUC__ --platform=unix64 -j2 platform: Linux-6.6.15-amd64-x86_64-with-glibc2.37 python: 3.11.8 client-version: 1.3.53 compiler: g++ (Debian 13.2.0-13) 13.2.0 cppcheck: head 2.14.0 head-info: 9b87f67 (2024-04-23 10:17:07 +0200) count: 26 26 elapsed-time: 0.1 0.1 head-timing-info: old-timing-info: head results: xf86-video-dummy-0.4.0/src/dummy_cursor.c:20:32: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TRUE [valueFlowBailoutIncompleteVar] xf86-video-dummy-0.4.0/src/dummy_cursor.c:32:32: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FALSE [valueFlowBailoutIncompleteVar] xf86-video-dummy-0.4.0/src/dummy_cursor.c:63:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable xf86Screens [valueFlowBailoutIncompleteVar] xf86-video-dummy-0.4.0/src/dummy_cursor.c:78:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable xf86Screens [valueFlowBailoutIncompleteVar] xf86-video-dummy-0.4.0/src/dummy_cursor.c:76:27: style:inconclusive: Function 'DUMMYCursorInit' argument 1 names different: declaration 'pScrn' definition 'pScreen'. [funcArgNamesDifferent] xf86-video-dummy-0.4.0/src/dummy.h:29:39: note: Function 'DUMMYCursorInit' argument 1 names different: declaration 'pScrn' definition 'pScreen'. xf86-video-dummy-0.4.0/src/dummy_cursor.c:76:27: note: Function 'DUMMYCursorInit' argument 1 names different: declaration 'pScrn' definition 'pScreen'. xf86-video-dummy-0.4.0/src/dummy_cursor.c:56:56: style: Parameter 'src' can be declared as pointer to const. However it seems that 'dummyLoadCursorImage' is a callback function, if 'src' is declared with const you might also need to cast function pointer(s). [constParameterCallback] xf86-video-dummy-0.4.0/src/dummy_cursor.c:92:32: note: You might need to cast the function pointer here xf86-video-dummy-0.4.0/src/dummy_cursor.c:56:56: note: Parameter 'src' can be declared as pointer to const xf86-video-dummy-0.4.0/src/dummy_cursor.c:63:14: style: Variable 'dPtr' can be declared as pointer to const [constVariablePointer] xf86-video-dummy-0.4.0/src/dummy_driver.c:448:9: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TRUE [valueFlowBailoutIncompleteVar] xf86-video-dummy-0.4.0/src/dummy_driver.c:484:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FALSE [valueFlowBailoutIncompleteVar] xf86-video-dummy-0.4.0/src/dummy_driver.c:547:63: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable device [valueFlowBailoutIncompleteVar] xf86-video-dummy-0.4.0/src/dummy_driver.c:727:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TRUE [valueFlowBailoutIncompleteVar] xf86-video-dummy-0.4.0/src/dummy_driver.c:762:48: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable red [valueFlowBailoutIncompleteVar] xf86-video-dummy-0.4.0/src/dummy_driver.c:785:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable xf86Screens [valueFlowBailoutIncompleteVar] xf86-video-dummy-0.4.0/src/dummy_driver.c:957:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TRUE [valueFlowBailoutIncompleteVar] xf86-video-dummy-0.4.0/src/dummy_driver.c:970:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable xf86Screens [valueFlowBailoutIncompleteVar] xf86-video-dummy-0.4.0/src/dummy_driver.c:987:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable xf86Screens [valueFlowBailoutIncompleteVar] xf86-video-dummy-0.4.0/src/dummy_driver.c:994:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TRUE [valueFlowBailoutIncompleteVar] xf86-video-dummy-0.4.0/src/dummy_driver.c:1001:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable MODE_OK [valueFlowBailoutIncompleteVar] xf86-video-dummy-0.4.0/src/dummy_driver.c:1020:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TRUE [valueFlowBailoutIncompleteVar] xf86-video-dummy-0.4.0/src/dummy_driver.c:1057:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable TRUE [valueFlowBailoutIncompleteVar] xf86-video-dummy-0.4.0/src/dummy_driver.c:502:17: style: Condition 'numUsed>0' is always true [knownConditionTrueFalse] xf86-video-dummy-0.4.0/src/dummy_driver.c:496:23: note: Assuming that condition '(numDevSections=xf86MatchDevice("dummy",&devSections))<=0' is not redundant xf86-video-dummy-0.4.0/src/dummy_driver.c:500:13: note: numUsed is assigned 'numDevSections' here. xf86-video-dummy-0.4.0/src/dummy_driver.c:502:17: note: Condition 'numUsed>0' is always true xf86-video-dummy-0.4.0/src/dummy_driver.c:850:9: warning: %u in format string (no. 1) requires 'unsigned int' but the argument type is 'signed int'. [invalidPrintfArgType_uint] xf86-video-dummy-0.4.0/src/dummy_driver.c:803:10: error: Memory leak: pixels [memleak] xf86-video-dummy-0.4.0/src/dummy_driver.c:805:32: error: Memory leak: pixels [memleak] xf86-video-dummy-0.4.0/src/dummy_driver.c:843:14: style: Local variable 'i' shadows outer argument [shadowArgument] xf86-video-dummy-0.4.0/src/dummy_driver.c:773:17: note: Shadowed declaration xf86-video-dummy-0.4.0/src/dummy_driver.c:843:14: note: Shadow variable xf86-video-dummy-0.4.0/src/dummy_driver.c:740:9: style: Parameter 'indices' can be declared as pointer to const. However it seems that 'DUMMYLoadPalette' is a callback function, if 'indices' is declared with const you might also need to cast function pointer(s). [constParameterCallback] xf86-video-dummy-0.4.0/src/dummy_driver.c:929:26: note: You might need to cast the function pointer here xf86-video-dummy-0.4.0/src/dummy_driver.c:740:9: note: Parameter 'indices' can be declared as pointer to const diff: DONE