2025-09-16 02:01 ftp://ftp.de.debian.org/debian/pool/main/s/scim-chewing/scim-chewing_0.5.1.orig.tar.gz cppcheck-options: --library=posix --library=gnu --library=bsd --library=gtk --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-79-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: 3e169d6 (2025-09-15 13:38:15 +0200) count: 21 43 elapsed-time: 0.2 0.6 head-timing-info: old-timing-info: head results: scim-chewing-0.5.1/src/scim_chewing_imengine.cpp:215:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SCIM_CHEWING_ICON_FILE [valueFlowBailoutIncompleteVar] scim-chewing-0.5.1/src/scim_chewing_imengine.cpp:319:41: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SCIM_KEYBOARD_Default [valueFlowBailoutIncompleteVar] scim-chewing-0.5.1/src/scim_chewing_imengine.cpp:620:38: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SCIM_ATTR_BACKGROUND [valueFlowBailoutIncompleteVar] scim-chewing-0.5.1/src/scim_chewing_imengine.cpp:694:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SCIM_KEY_ReleaseMask [valueFlowBailoutIncompleteVar] scim-chewing-0.5.1/src/scim_chewing_imengine.cpp:722:40: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable CHINESE_MODE [valueFlowBailoutIncompleteVar] scim-chewing-0.5.1/src/scim_chewing_imengine.cpp:765:39: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable FULLSHAPE_MODE [valueFlowBailoutIncompleteVar] scim-chewing-0.5.1/src/scim_chewing_imengine.cpp:533:39: style: Array index 'i' is used before limits check. [arrayIndexThenCheck] scim-chewing-0.5.1/src/scim_chewing_imengine.cpp:773:21: warning: Member variable 'ChewingLookupTable::ctx' is not initialized in the constructor. [uninitMemberVar] scim-chewing-0.5.1/src/scim_chewing_imengine.cpp:124:30: style:inconclusive: Either there is a missing 'override', or the member function 'ChewingIMEngineFactory::init' can be const. [functionConst] scim-chewing-0.5.1/src/scim_chewing_imengine.h:54:10: note: Either there is a missing 'override', or the member function 'ChewingIMEngineFactory::init' can be const. scim-chewing-0.5.1/src/scim_chewing_imengine.cpp:124:30: note: Either there is a missing 'override', or the member function 'ChewingIMEngineFactory::init' can be const. scim-chewing-0.5.1/src/scim_chewing_imengine.h:91:18: style: Virtual function 'reset' is called from constructor 'ChewingIMEngineInstance(ChewingIMEngineFactory*factory,const String&encoding,int id=-1)' at line 280. Dynamic binding is not used. [virtualCallInConstructor] scim-chewing-0.5.1/src/scim_chewing_imengine.cpp:280:5: note: Calling reload_config scim-chewing-0.5.1/src/scim_chewing_imengine.cpp:293:5: note: Calling reset scim-chewing-0.5.1/src/scim_chewing_imengine.h:91:18: note: reset is a virtual function scim-chewing-0.5.1/src/scim_chewing_imengine.h:33:5: style: Class 'ChewingIMEngineFactory' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] scim-chewing-0.5.1/src/scim_chewing_imengine.cpp:193:9: warning: %X in format string (no. 1) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int] scim-chewing-0.5.1/src/scim_chewing_imengine.cpp:193:9: warning: %X in format string (no. 2) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int] scim-chewing-0.5.1/src/scim_chewing_imengine.cpp:193:9: warning: %X in format string (no. 3) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int] scim-chewing-0.5.1/src/scim_chewing_imengine.cpp:518:42: style: C-style pointer casting [cstyleCast] scim-chewing-0.5.1/src/scim_chewing_imengine.cpp:315:66: style:inconclusive: Function 'process_key_event' argument 1 names different: declaration 'key' definition 'rawkey'. [funcArgNamesDifferent] scim-chewing-0.5.1/src/scim_chewing_imengine.h:85:53: note: Function 'process_key_event' argument 1 names different: declaration 'key' definition 'rawkey'. scim-chewing-0.5.1/src/scim_chewing_imengine.cpp:315:66: note: Function 'process_key_event' argument 1 names different: declaration 'key' definition 'rawkey'. scim-chewing-0.5.1/src/scim_chewing_imengine.cpp:813:38: style:inconclusive: Function 'init' argument 1 names different: declaration 's' definition 'selection_keys'. [funcArgNamesDifferent] scim-chewing-0.5.1/src/scim_chewing_imengine.h:25:22: note: Function 'init' argument 1 names different: declaration 's' definition 'selection_keys'. scim-chewing-0.5.1/src/scim_chewing_imengine.cpp:813:38: note: Function 'init' argument 1 names different: declaration 's' definition 'selection_keys'. scim-chewing-0.5.1/src/scim_chewing_imengine.cpp:813:58: style:inconclusive: Function 'init' argument 2 names different: declaration 'num' definition 'selection_keys_num'. [funcArgNamesDifferent] scim-chewing-0.5.1/src/scim_chewing_imengine.h:25:29: note: Function 'init' argument 2 names different: declaration 'num' definition 'selection_keys_num'. scim-chewing-0.5.1/src/scim_chewing_imengine.cpp:813:58: note: Function 'init' argument 2 names different: declaration 'num' definition 'selection_keys_num'. scim-chewing-0.5.1/src/scim_chewing_imengine.cpp:187:16: style: Local variable 'str' shadows outer variable [shadowVariable] scim-chewing-0.5.1/src/scim_chewing_imengine.cpp:139:12: note: Shadowed declaration scim-chewing-0.5.1/src/scim_chewing_imengine.cpp:187:16: note: Shadow variable scim-chewing-0.5.1/src/scim_color_button.h:56:0: error: failed to evaluate #if condition, undefined function-like macro invocation: GTK_CHECK_VERSION( ... ) [preprocessorErrorDirective] scim-chewing-0.5.1/src/scim_color_button.h:56:2: error: failed to evaluate #if condition, undefined function-like macro invocation: GTK_CHECK_VERSION( ... ) [preprocessorErrorDirective] diff: 2.18.0 scim-chewing-0.5.1/src/scim_chewing_imengine_setup.cpp:594:0: error: failed to expand 'g_signal_connect', it is invalid to use a preprocessor directive as macro parameter [preprocessorErrorDirective] 2.18.0 scim-chewing-0.5.1/src/scim_chewing_imengine_setup.cpp:594:1: error: failed to expand 'g_signal_connect', it is invalid to use a preprocessor directive as macro parameter [preprocessorErrorDirective] 2.18.0 scim-chewing-0.5.1/src/scim_color_button.cpp:107:40: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GTK_TYPE_DRAWING_AREA [valueFlowBailoutIncompleteVar] 2.18.0 scim-chewing-0.5.1/src/scim_color_button.cpp:120:20: style: C-style pointer casting [cstyleCast] 2.18.0 scim-chewing-0.5.1/src/scim_color_button.cpp:124:7: warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast] 2.18.0 scim-chewing-0.5.1/src/scim_color_button.cpp:156:28: warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast] 2.18.0 scim-chewing-0.5.1/src/scim_color_button.cpp:157:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GDK_BUTTON_PRESS_MASK [valueFlowBailoutIncompleteVar] 2.18.0 scim-chewing-0.5.1/src/scim_color_button.cpp:169:38: warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast] 2.18.0 scim-chewing-0.5.1/src/scim_color_button.cpp:231:30: style: C-style pointer casting [cstyleCast] 2.18.0 scim-chewing-0.5.1/src/scim_color_button.cpp:249:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GDK_RGB_DITHER_MAX [valueFlowBailoutIncompleteVar] 2.18.0 scim-chewing-0.5.1/src/scim_color_button.cpp:264:38: warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast] 2.18.0 scim-chewing-0.5.1/src/scim_color_button.cpp:287:32: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SCIM_ICONDIR [valueFlowBailoutIncompleteVar] 2.18.0 scim-chewing-0.5.1/src/scim_color_button.cpp:405:19: warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast] 2.18.0 scim-chewing-0.5.1/src/scim_color_button.cpp:405:51: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable width [valueFlowBailoutIncompleteVar] 2.18.0 scim-chewing-0.5.1/src/scim_color_button.cpp:406:19: warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast] 2.18.0 scim-chewing-0.5.1/src/scim_color_button.cpp:458:30: warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast] 2.18.0 scim-chewing-0.5.1/src/scim_color_button.cpp:482:28: warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast] 2.18.0 scim-chewing-0.5.1/src/scim_color_button.cpp:511:49: style: Parameter 'bevent' can be declared as pointer to const. However it seems that 'scim_color_button_button_press' is a callback function, if 'bevent' is declared with const you might also need to cast function pointer(s). [constParameterCallback] scim-chewing-0.5.1/src/scim_color_button.cpp:140:42: note: You might need to cast the function pointer here scim-chewing-0.5.1/src/scim_color_button.cpp:511:49: note: Parameter 'bevent' can be declared as pointer to const 2.18.0 scim-chewing-0.5.1/src/scim_color_button.cpp:513:38: warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast] 2.18.0 scim-chewing-0.5.1/src/scim_color_button.cpp:514:48: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GDK_BUTTON_PRESS [valueFlowBailoutIncompleteVar] 2.18.0 scim-chewing-0.5.1/src/scim_color_button.cpp:533:38: warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast] 2.18.0 scim-chewing-0.5.1/src/scim_color_button.cpp:549:51: style: Parameter 'bevent' can be declared as pointer to const. However it seems that 'scim_color_button_button_release' is a callback function, if 'bevent' is declared with const you might also need to cast function pointer(s). [constParameterCallback] scim-chewing-0.5.1/src/scim_color_button.cpp:141:42: note: You might need to cast the function pointer here scim-chewing-0.5.1/src/scim_color_button.cpp:549:51: note: Parameter 'bevent' can be declared as pointer to const 2.18.0 scim-chewing-0.5.1/src/scim_color_button.cpp:551:38: warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast] 2.18.0 scim-chewing-0.5.1/src/scim_color_button.cpp:583:12: style: C-style pointer casting [cstyleCast] head scim-chewing-0.5.1/src/scim_color_button.h:56:0: error: failed to evaluate #if condition, undefined function-like macro invocation: GTK_CHECK_VERSION( ... ) [preprocessorErrorDirective] head scim-chewing-0.5.1/src/scim_color_button.h:56:2: error: failed to evaluate #if condition, undefined function-like macro invocation: GTK_CHECK_VERSION( ... ) [preprocessorErrorDirective] DONE