2025-11-03 13:45 ftp://ftp.de.debian.org/debian/pool/main/a/ayatana-indicator-keyboard/ayatana-indicator-keyboard_24.7.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 -j1 platform: Linux-6.8.0-87-generic-x86_64-with-glibc2.39 python: 3.12.3 client-version: 1.3.69 compiler: g++ (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0 cppcheck: head 2.18.0 head-info: 1f35303 (2025-11-01 19:39:44 +0100) count: 17 64 elapsed-time: 0.3 0.7 head-timing-info: old-timing-info: head results: ayatana-indicator-keyboard-24.7.2/src/system-layouts.h:47:0: error: failed to evaluate #if condition, undefined function-like macro invocation: GLIB_CHECK_VERSION( ... ) [preprocessorErrorDirective] ayatana-indicator-keyboard-24.7.2/src/system-layouts.h:47:10: error: failed to evaluate #if condition, undefined function-like macro invocation: GLIB_CHECK_VERSION( ... ) [preprocessorErrorDirective] ayatana-indicator-keyboard-24.7.2/src/main.c:34:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_SOURCE_REMOVE [valueFlowBailoutIncompleteVar] ayatana-indicator-keyboard-24.7.2/src/main.c:39:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LC_ALL [valueFlowBailoutIncompleteVar] ayatana-indicator-keyboard-24.7.2/src/service.c:174:52: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_MENU_ATTRIBUTE_ICON [valueFlowBailoutIncompleteVar] ayatana-indicator-keyboard-24.7.2/src/service.c:487:45: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable __FUNCTION__ [valueFlowBailoutIncompleteVar] ayatana-indicator-keyboard-24.7.2/src/service.c:542:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable indicator_keyboard_service_parent_class [valueFlowBailoutIncompleteVar] ayatana-indicator-keyboard-24.7.2/src/service.c:604:45: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_BUS_TYPE_SESSION [valueFlowBailoutIncompleteVar] ayatana-indicator-keyboard-24.7.2/src/service.c:358:20: warning: %i in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] ayatana-indicator-keyboard-24.7.2/src/service.c:621:77: style:inconclusive: Function 'indicator_keyboard_service_AddKeyboardSource' argument 1 names different: declaration 'pService' definition 'self'. [funcArgNamesDifferent] ayatana-indicator-keyboard-24.7.2/src/service.h:48:77: note: Function 'indicator_keyboard_service_AddKeyboardSource' argument 1 names different: declaration 'pService' definition 'self'. ayatana-indicator-keyboard-24.7.2/src/service.c:621:77: note: Function 'indicator_keyboard_service_AddKeyboardSource' argument 1 names different: declaration 'pService' definition 'self'. ayatana-indicator-keyboard-24.7.2/src/service.c:187:68: style: Parameter 'self' can be declared as pointer to const [constParameterPointer] ayatana-indicator-keyboard-24.7.2/src/service.c:329:39: style: Parameter 'pAction' can be declared as pointer to const. However it seems that 'onSettings' is a callback function, if 'pAction' is declared with const you might also need to cast function pointer(s). [constParameterCallback] ayatana-indicator-keyboard-24.7.2/src/service.c:409:5: note: You might need to cast the function pointer here ayatana-indicator-keyboard-24.7.2/src/service.c:329:39: note: Parameter 'pAction' can be declared as pointer to const ayatana-indicator-keyboard-24.7.2/src/service.c:329:58: style: Parameter 'pVariant' can be declared as pointer to const. However it seems that 'onSettings' is a callback function, if 'pVariant' is declared with const you might also need to cast function pointer(s). [constParameterCallback] ayatana-indicator-keyboard-24.7.2/src/service.c:409:5: note: You might need to cast the function pointer here ayatana-indicator-keyboard-24.7.2/src/service.c:329:58: note: Parameter 'pVariant' can be declared as pointer to const ayatana-indicator-keyboard-24.7.2/src/service.c:331:31: style: Variable 'self' can be declared as pointer to const [constVariablePointer] ayatana-indicator-keyboard-24.7.2/src/service.c:370:92: style: Parameter 'pUserData' can be declared as pointer to const. However it seems that 'valueToVariant' is a callback function, if 'pUserData' is declared with const you might also need to cast function pointer(s). [constParameterCallback] ayatana-indicator-keyboard-24.7.2/src/service.c:401:152: note: You might need to cast the function pointer here ayatana-indicator-keyboard-24.7.2/src/service.c:370:92: note: Parameter 'pUserData' can be declared as pointer to const ayatana-indicator-keyboard-24.7.2/src/service.c:553:12: style: Variable 'sLib' can be declared as pointer to const [constVariablePointer] ayatana-indicator-keyboard-24.7.2/src/service.c:570:12: style: Variable 'sError' can be declared as pointer to const [constVariablePointer] diff: 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-lomiri.c:167:35: style: Parameter 'pKeyboard' can be declared as pointer to const [constParameterPointer] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-lomiri.c:172:40: style: Parameter 'pKeyboard' can be declared as pointer to const [constParameterPointer] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-lomiri.c:191:5: warning: Return value of function g_hash_table_lookup_extended() is not used. [ignoredReturnValue] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-lomiri.c:208:16: style: Variable 'sId' can be declared as pointer to const [constVariablePointer] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-lomiri.c:219:19: style: Variable 'pDict' can be declared as pointer to const [constVariablePointer] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-lomiri.c:228:24: style: Local variable 'sId' shadows outer variable [shadowVariable] ayatana-indicator-keyboard-24.7.2/src/keyboard-lomiri.c:208:16: note: Shadowed declaration ayatana-indicator-keyboard-24.7.2/src/keyboard-lomiri.c:228:24: note: Shadow variable 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-lomiri.c:228:24: style: Variable 'sId' can be declared as pointer to const [constVariablePointer] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-lomiri.c:232:33: style: Local variable 'cDictBuilder' shadows outer variable [shadowVariable] ayatana-indicator-keyboard-24.7.2/src/keyboard-lomiri.c:216:25: note: Shadowed declaration ayatana-indicator-keyboard-24.7.2/src/keyboard-lomiri.c:232:33: note: Shadow variable 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-lomiri.c:235:27: style: Local variable 'pDict' shadows outer variable [shadowVariable] ayatana-indicator-keyboard-24.7.2/src/keyboard-lomiri.c:219:19: note: Shadowed declaration ayatana-indicator-keyboard-24.7.2/src/keyboard-lomiri.c:235:27: note: Shadow variable 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-lomiri.c:235:27: style: Variable 'pDict' can be declared as pointer to const [constVariablePointer] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-lomiri.c:248:19: style: Variable 'pAccountsSources' can be declared as pointer to const [constVariablePointer] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-lomiri.c:253:20: style: Variable 'sInterface' can be declared as pointer to const [constVariablePointer] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-lomiri.c:256:136: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_DBUS_CALL_FLAGS_NONE [valueFlowBailoutIncompleteVar] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-lomiri.c:264:16: style: Variable 'sId' can be declared as pointer to const [constVariablePointer] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-lomiri.c:317:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable keyboard_parent_class [valueFlowBailoutIncompleteVar] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-lomiri.c:381:54: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable RXKB_CONTEXT_LOAD_EXOTIC_RULES [valueFlowBailoutIncompleteVar] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-lomiri.c:58:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_SOURCE_REMOVE [valueFlowBailoutIncompleteVar] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-lomiri.c:83:154: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_DBUS_CALL_FLAGS_NONE [valueFlowBailoutIncompleteVar] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:101:16: style: Variable 'sVariant' can be declared as pointer to const [constVariablePointer] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:116:15: style: Variable 'pValue' can be declared as pointer to const [constVariablePointer] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:117:153: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_DBUS_CALL_FLAGS_NONE [valueFlowBailoutIncompleteVar] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:130:185: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_DBUS_CALL_FLAGS_NONE [valueFlowBailoutIncompleteVar] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:130:19: style: Local variable 'pUser' shadows outer argument [shadowArgument] ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:125:62: note: Shadowed declaration ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:130:19: note: Shadow variable 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:197:23: style: Local variable 'nLayouts' shadows outer variable [shadowVariable] ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:193:19: note: Shadowed declaration ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:197:23: note: Shadow variable 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:258:39: style: Parameter 'pDisplay' can be declared as pointer to const. However it seems that 'onCheckEvent' is a callback function, if 'pDisplay' is declared with const you might also need to cast function pointer(s). [constParameterCallback] ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:279:77: note: You might need to cast the function pointer here ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:258:39: note: Parameter 'pDisplay' can be declared as pointer to const 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:260:11: style: Variable 'pXkbEventType' can be declared as pointer to const [constVariablePointer] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:264:19: style: Variable 'pXkbEvent' can be declared as pointer to const [constVariablePointer] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:266:40: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable XkbStateNotify [valueFlowBailoutIncompleteVar] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:279:92: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable XPointer [valueFlowBailoutIncompleteVar] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:358:47: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_IO_IN [valueFlowBailoutIncompleteVar] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:372:40: style: Parameter 'pKeyboard' can be declared as pointer to const [constParameterPointer] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:410:16: style: Variable 'sVariant' can be declared as pointer to const [constVariablePointer] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:423:5: warning: Return value of function g_hash_table_lookup_extended() is not used. [ignoredReturnValue] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:446:16: style: Variable 'sId' can be declared as pointer to const [constVariablePointer] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:449:16: style: Variable 'sVariant' can be declared as pointer to const [constVariablePointer] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:463:13: style: Statements following noreturn function 'g_error()' will never be executed. [unreachableCode] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:465:13: error: Memory leak: lParams [memleak] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:514:5: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable keyboard_parent_class [valueFlowBailoutIncompleteVar] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:564:101: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_CONNECT_SWAPPED [valueFlowBailoutIncompleteVar] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:575:54: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable RXKB_CONTEXT_LOAD_EXOTIC_RULES [valueFlowBailoutIncompleteVar] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:632:9: style: Statements following noreturn function 'g_error()' will never be executed. [unreachableCode] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:650:19: style: Variable 'pState' can be declared as pointer to const [constVariablePointer] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/keyboard-x11.c:78:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_SOURCE_REMOVE [valueFlowBailoutIncompleteVar] head ayatana-indicator-keyboard-24.7.2/src/service.c:370:92: style: Parameter 'pUserData' can be declared as pointer to const. However it seems that 'valueToVariant' is a callback function, if 'pUserData' is declared with const you might also need to cast function pointer(s). [constParameterCallback] ayatana-indicator-keyboard-24.7.2/src/service.c:401:152: note: You might need to cast the function pointer here ayatana-indicator-keyboard-24.7.2/src/service.c:370:92: note: Parameter 'pUserData' can be declared as pointer to const 2.18.0 ayatana-indicator-keyboard-24.7.2/src/system-layouts.h:116:9: error: Memory leak: lLayouts [memleak] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/system-layouts.h:116:9: error: Memory leak: pRegex [memleak] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/system-layouts.h:130:9: error: Memory leak: lLayouts [memleak] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/system-layouts.h:22:38: style: Parameter 'sLocation' can be declared as pointer to const [constParameterPointer] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/system-layouts.h:24:48: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_FILE_TEST_EXISTS [valueFlowBailoutIncompleteVar] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/system-layouts.h:33:5: warning: Return value of function g_file_get_contents() is not used. [ignoredReturnValue] head ayatana-indicator-keyboard-24.7.2/src/system-layouts.h:47:0: error: failed to evaluate #if condition, undefined function-like macro invocation: GLIB_CHECK_VERSION( ... ) [preprocessorErrorDirective] head ayatana-indicator-keyboard-24.7.2/src/system-layouts.h:47:10: error: failed to evaluate #if condition, undefined function-like macro invocation: GLIB_CHECK_VERSION( ... ) [preprocessorErrorDirective] 2.18.0 ayatana-indicator-keyboard-24.7.2/src/system-layouts.h:68:9: error: Memory leak: pRegex [memleak] DONE