2025-08-30 22:24 ftp://ftp.de.debian.org/debian/pool/main/g/galculator/galculator_2.1.4.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 -j4 platform: Linux-6.12.41+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: 2ee39fe (2025-08-30 22:07:31 +0200) count: 2 108 elapsed-time: 0.1 0.4 head-timing-info: old-timing-info: head results: galculator-2.1.4/src/galculator.h:56:0: error: failed to evaluate #if condition, undefined function-like macro invocation: GTK_CHECK_VERSION( ... ) [preprocessorErrorDirective] galculator-2.1.4/src/galculator.h:56:2: error: failed to evaluate #if condition, undefined function-like macro invocation: GTK_CHECK_VERSION( ... ) [preprocessorErrorDirective] diff: 2.18.0 galculator-2.1.4/src/calc_basic.c:301:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/calc_basic.c:481:46: error: Uninitialized variables: token.number, token.operation [uninitvar] 2.18.0 galculator-2.1.4/src/calc_basic.c:492:3: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg] 2.18.0 galculator-2.1.4/src/calc_basic.c:522:12: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/calc_basic.c:537:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/calc_basic.c:568:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/calc_basic.c:589:30: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/calc_basic.c:609:22: style: Condition 'rpn_stack_size>0' is always true [knownConditionTrueFalse] galculator-2.1.4/src/calc_basic.c:604:21: note: Assuming that condition 'rpn_stack_size<=0' is not redundant galculator-2.1.4/src/calc_basic.c:609:22: note: Condition 'rpn_stack_size>0' is always true 2.18.0 galculator-2.1.4/src/calc_basic.c:700:47: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/calc_basic.c:729:47: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/callbacks.c:1061:36: style: Parameter 'menuitem' can be declared as pointer to const. However it seems that 'mr_menu_handler' is a callback function, if 'menuitem' is declared with const you might also need to cast function pointer(s). [constParameterCallback] galculator-2.1.4/src/callbacks.c:1080:53: note: You might need to cast the function pointer here galculator-2.1.4/src/callbacks.c:1061:36: note: Parameter 'menuitem' can be declared as pointer to const 2.18.0 galculator-2.1.4/src/callbacks.c:1432:91: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/callbacks.c:1595:89: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/callbacks.c:1610:52: style: Parameter 'rb' can be declared as pointer to const [constParameterPointer] 2.18.0 galculator-2.1.4/src/callbacks.c:1610:65: style: Parameter 'user_data' can be declared as pointer to const [constParameterPointer] 2.18.0 galculator-2.1.4/src/callbacks.c:1616:54: style: Parameter 'rb' can be declared as pointer to const [constParameterPointer] 2.18.0 galculator-2.1.4/src/callbacks.c:1616:67: style: Parameter 'user_data' can be declared as pointer to const [constParameterPointer] 2.18.0 galculator-2.1.4/src/callbacks.c:1641:45: style: Parameter 'editable' can be declared as pointer to const [constParameterPointer] 2.18.0 galculator-2.1.4/src/callbacks.c:1641:64: style: Parameter 'user_data' can be declared as pointer to const [constParameterPointer] 2.18.0 galculator-2.1.4/src/callbacks.c:1693:61: style: Parameter 'event' can be declared as pointer to const [constParameterPointer] 2.18.0 galculator-2.1.4/src/callbacks.c:1703:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GDK_2BUTTON_PRESS [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/callbacks.c:1747:37: style: Parameter 'widget' can be declared as pointer to const [constParameterPointer] 2.18.0 galculator-2.1.4/src/callbacks.c:1747:55: style: Parameter 'event' can be declared as pointer to const [constParameterPointer] 2.18.0 galculator-2.1.4/src/callbacks.c:1747:71: style: Parameter 'user_data' can be declared as pointer to const [constParameterPointer] 2.18.0 galculator-2.1.4/src/callbacks.c:596:48: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GDK_SELECTION_CLIPBOARD [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/callbacks.c:609:63: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GDK_SELECTION_CLIPBOARD [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/callbacks.c:626:48: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GDK_SELECTION_CLIPBOARD [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/callbacks.c:649:49: error: Dereferencing 'string' after it is deallocated / released [deallocuse] 2.18.0 galculator-2.1.4/src/callbacks.c:650:17: error: Memory pointed to by 'string' is freed twice. [doubleFree] galculator-2.1.4/src/callbacks.c:646:17: note: Memory pointed to by 'string' is freed twice. galculator-2.1.4/src/callbacks.c:650:17: note: Memory pointed to by 'string' is freed twice. 2.18.0 galculator-2.1.4/src/callbacks.c:653:49: error: Dereferencing 'string' after it is deallocated / released [deallocuse] 2.18.0 galculator-2.1.4/src/callbacks.c:654:17: error: Memory pointed to by 'string' is freed twice. [doubleFree] galculator-2.1.4/src/callbacks.c:646:17: note: Memory pointed to by 'string' is freed twice. galculator-2.1.4/src/callbacks.c:654:17: note: Memory pointed to by 'string' is freed twice. 2.18.0 galculator-2.1.4/src/callbacks.c:673:49: error: Dereferencing 'string' after it is deallocated / released [deallocuse] 2.18.0 galculator-2.1.4/src/callbacks.c:674:17: error: Memory pointed to by 'string' is freed twice. [doubleFree] galculator-2.1.4/src/callbacks.c:670:17: note: Memory pointed to by 'string' is freed twice. galculator-2.1.4/src/callbacks.c:674:17: note: Memory pointed to by 'string' is freed twice. 2.18.0 galculator-2.1.4/src/callbacks.c:677:49: error: Dereferencing 'string' after it is deallocated / released [deallocuse] 2.18.0 galculator-2.1.4/src/callbacks.c:678:17: error: Memory pointed to by 'string' is freed twice. [doubleFree] galculator-2.1.4/src/callbacks.c:670:17: note: Memory pointed to by 'string' is freed twice. galculator-2.1.4/src/callbacks.c:678:17: note: Memory pointed to by 'string' is freed twice. 2.18.0 galculator-2.1.4/src/callbacks.c:683:58: style: Parameter 'menuitem' can be declared as pointer to const [constParameterPointer] 2.18.0 galculator-2.1.4/src/callbacks.c:684:58: style: Parameter 'user_data' can be declared as pointer to const [constParameterPointer] 2.18.0 galculator-2.1.4/src/callbacks.c:972:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/config_file.c:180:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable desc [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/config_file.c:196:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable name [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/config_file.c:214:35: style: Parameter 'key' can be declared as pointer to const [constParameterPointer] 2.18.0 galculator-2.1.4/src/config_file.c:231:139: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/config_file.c:274:45: style: Parameter 'filename' can be declared as pointer to const [constParameterPointer] 2.18.0 galculator-2.1.4/src/config_file.c:285:54: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/config_file.c:404:88: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/config_file.c:443:31: style: Parameter 'filename' can be declared as pointer to const [constParameterPointer] 2.18.0 galculator-2.1.4/src/config_file.c:445:8: style: Variable 'int_var' can be declared as pointer to const [constVariablePointer] 2.18.0 galculator-2.1.4/src/config_file.c:447:12: style: Variable 'bool_var' can be declared as pointer to const [constVariablePointer] 2.18.0 galculator-2.1.4/src/config_file.c:501:103: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/display.c:126:48: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GDK_SELECTION_TYPE_STRING [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/display.c:181:30: style: Variable 'tag' can be declared as pointer to const [constVariablePointer] 2.18.0 galculator-2.1.4/src/display.c:207:18: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PANGO_TYPE_LANGUAGE [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/display.c:257:63: error: Allocation with g_strdup_printf, gtk_text_buffer_insert_with_tags_by_name doesn't release it. [leakNoVarFunctionCall] 2.18.0 galculator-2.1.4/src/display.c:521:16: style: Variable 'first_module' is assigned a value that is never used. [unreadVariable] 2.18.0 galculator-2.1.4/src/display.c:558:9: style: Local variable 'display_value' shadows outer variable [shadowVariable] galculator-2.1.4/src/display.c:55:8: note: Shadowed declaration galculator-2.1.4/src/display.c:558:9: note: Shadow variable 2.18.0 galculator-2.1.4/src/display.c:620:52: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GTK_STATE_NORMAL [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/display.c:66:23: style: Parameter 'event' can be declared as pointer to const [constParameterPointer] 2.18.0 galculator-2.1.4/src/display.c:69:35: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GDK_NONE [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/display.c:766:33: style: Parameter 'string' can be declared as pointer to const [constParameterPointer] 2.18.0 galculator-2.1.4/src/display.c:776:19: style: Variable 'dline' can be declared as pointer to const [constVariablePointer] 2.18.0 galculator-2.1.4/src/display.c:968:44: style: Parameter 'stack' can be declared as pointer to const [constParameterPointer] head galculator-2.1.4/src/galculator.h:56:0: error: failed to evaluate #if condition, undefined function-like macro invocation: GTK_CHECK_VERSION( ... ) [preprocessorErrorDirective] head galculator-2.1.4/src/galculator.h:56:2: error: failed to evaluate #if condition, undefined function-like macro invocation: GTK_CHECK_VERSION( ... ) [preprocessorErrorDirective] 2.18.0 galculator-2.1.4/src/general_functions.c:123:21: style: Parameter 'bin_string' can be declared as pointer to const [constParameterPointer] 2.18.0 galculator-2.1.4/src/general_functions.c:131:48: error: Memory leak: lower_bin_string [memleak] 2.18.0 galculator-2.1.4/src/general_functions.c:138:90: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/general_functions.c:164:56: style:inconclusive: Function 'ftoax' argument 4 names different: declaration 'is_signedh' definition 'is_signed'. [funcArgNamesDifferent] galculator-2.1.4/src/general_functions.h:38:56: note: Function 'ftoax' argument 4 names different: declaration 'is_signedh' definition 'is_signed'. galculator-2.1.4/src/general_functions.c:164:56: note: Function 'ftoax' argument 4 names different: declaration 'is_signedh' definition 'is_signed'. 2.18.0 galculator-2.1.4/src/general_functions.c:194:81: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/general_functions.c:236:70: style:inconclusive: Function 'set_checkbutton' argument 3 names different: declaration 'checked' definition 'is_active'. [funcArgNamesDifferent] galculator-2.1.4/src/general_functions.h:45:70: note: Function 'set_checkbutton' argument 3 names different: declaration 'checked' definition 'is_active'. galculator-2.1.4/src/general_functions.c:236:70: note: Function 'set_checkbutton' argument 3 names different: declaration 'checked' definition 'is_active'. 2.18.0 galculator-2.1.4/src/general_functions.c:239:13: style: Variable 'bool_var' can be declared as pointer to const [constVariablePointer] 2.18.0 galculator-2.1.4/src/general_functions.c:253:8: style: Variable 'int_var' can be declared as pointer to const [constVariablePointer] 2.18.0 galculator-2.1.4/src/general_functions.c:286:8: style: Variable 'size' can be declared as pointer to const [constVariablePointer] 2.18.0 galculator-2.1.4/src/general_functions.c:366:8: style: Variable 'valid_numbers' can be declared as const array [constVariable] 2.18.0 galculator-2.1.4/src/general_functions.c:376:32: style: Parameter 'item_name' can be declared as pointer to const [constParameterPointer] 2.18.0 galculator-2.1.4/src/general_functions.c:398:101: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/general_functions.c:573:68: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/general_functions.c:57:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/general_functions.c:673:21: style: Parameter 'tooltip' can be declared as pointer to const [constParameterPointer] 2.18.0 galculator-2.1.4/src/general_functions.c:713:51: style: Parameter 'expression' can be declared as pointer to const [constParameterPointer] 2.18.0 galculator-2.1.4/src/general_functions.c:749:22: style:inconclusive: Function 'rad2x' argument 1 names different: declaration 'x' definition 'rad'. [funcArgNamesDifferent] galculator-2.1.4/src/general_functions.h:83:22: note: Function 'rad2x' argument 1 names different: declaration 'x' definition 'rad'. galculator-2.1.4/src/general_functions.c:749:22: note: Function 'rad2x' argument 1 names different: declaration 'x' definition 'rad'. 2.18.0 galculator-2.1.4/src/general_functions.c:833:14: style: Variable 'prefs_sep' is assigned a value that is never used. [unreadVariable] 2.18.0 galculator-2.1.4/src/general_functions.c:833:4: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg] 2.18.0 galculator-2.1.4/src/general_functions.c:846:1: error: Memory leak: prefs_sep [memleak] 2.18.0 galculator-2.1.4/src/general_functions.c:920:3: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/main.c:170:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/math_functions.c:119:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_PI [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/math_functions.c:124:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_PI [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/math_functions.c:129:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_PI [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/math_functions.c:134:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_PI [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/ui.c:1002:51: error: Allocation with g_strdup_printf, gtk_window_set_title doesn't release it. [leakNoVarFunctionCall] 2.18.0 galculator-2.1.4/src/ui.c:1130:56: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE_UI_DIR [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/ui.c:1145:50: style: Parameter 'text' can be declared as pointer to const [constParameterPointer] 2.18.0 galculator-2.1.4/src/ui.c:1247:13: style: Variable 'classic_view_vbox' can be declared as pointer to const [constVariablePointer] 2.18.0 galculator-2.1.4/src/ui.c:1257:44: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE_UI_DIR [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/ui.c:1278:14: style: Variable 'paper_view_vbox' can be declared as pointer to const [constVariablePointer] 2.18.0 galculator-2.1.4/src/ui.c:1292:42: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE_UI_DIR [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/ui.c:327:41: error: Dereferencing 'child_widget' after it is deallocated / released [deallocuse] 2.18.0 galculator-2.1.4/src/ui.c:341:43: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE_UI_DIR [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/ui.c:380:42: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE_UI_DIR [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/ui.c:404:1: error: Memory leak: signal_cb.detailed_signal [memleak] 2.18.0 galculator-2.1.4/src/ui.c:433:43: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE_UI_DIR [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/ui.c:471:1: error: Memory leak: signal_cb.detailed_signal [memleak] 2.18.0 galculator-2.1.4/src/ui.c:491:18: style: Variable 'size' can be declared as pointer to const [constVariablePointer] 2.18.0 galculator-2.1.4/src/ui.c:533:72: style: Parameter 'closure' can be declared as pointer to const. However it seems that 'set_table_child_tip_accel_finder' is a callback function, if 'closure' is declared with const you might also need to cast function pointer(s). [constParameterCallback] galculator-2.1.4/src/ui.c:572:59: note: You might need to cast the function pointer here galculator-2.1.4/src/ui.c:533:72: note: Parameter 'closure' can be declared as pointer to const 2.18.0 galculator-2.1.4/src/ui.c:536:12: style: Variable 'c' can be declared as pointer to const [constVariablePointer] 2.18.0 galculator-2.1.4/src/ui.c:757:42: style: Parameter 'b' can be declared as pointer to const [constParameterPointer] 2.18.0 galculator-2.1.4/src/ui.c:890:60: style: Parameter 'user_function' can be declared as pointer to const [constParameterPointer] 2.18.0 galculator-2.1.4/src/ui.c:91:25: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE [valueFlowBailoutIncompleteVar] 2.18.0 galculator-2.1.4/src/ui.c:930:61: style:inconclusive: Function 'ui_memory_menu_create' argument 2 names different: declaration 'const_handler' definition 'memory_handler'. [funcArgNamesDifferent] galculator-2.1.4/src/ui.h:70:15: note: Function 'ui_memory_menu_create' argument 2 names different: declaration 'const_handler' definition 'memory_handler'. galculator-2.1.4/src/ui.c:930:61: note: Function 'ui_memory_menu_create' argument 2 names different: declaration 'const_handler' definition 'memory_handler'. 2.18.0 galculator-2.1.4/src/ui.c:983:37: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE_UI_DIR [valueFlowBailoutIncompleteVar] DONE