2025-09-01 02:34 ftp://ftp.de.debian.org/debian/pool/main/l/lxterminal/lxterminal_0.4.1.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-79-generic-x86_64-with-glibc2.39 python: 3.12.3 client-version: 1.3.67 compiler: g++ (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0 cppcheck: head 2.18.0 head-info: 2ee39fe (2025-08-30 22:07:31 +0200) count: 4 51 elapsed-time: 0.1 1.7 head-timing-info: old-timing-info: head results: lxterminal-0.4.1/src/lxterminal.c:37:0: error: failed to evaluate #if condition, undefined function-like macro invocation: VTE_CHECK_VERSION( ... ) [preprocessorErrorDirective] lxterminal-0.4.1/src/lxterminal.c:37:2: error: failed to evaluate #if condition, undefined function-like macro invocation: VTE_CHECK_VERSION( ... ) [preprocessorErrorDirective] lxterminal-0.4.1/src/setting.h:90:0: error: failed to evaluate #if condition, undefined function-like macro invocation: VTE_CHECK_VERSION( ... ) [preprocessorErrorDirective] lxterminal-0.4.1/src/setting.h:90:2: error: failed to evaluate #if condition, undefined function-like macro invocation: VTE_CHECK_VERSION( ... ) [preprocessorErrorDirective] diff: 2.18.0 lxterminal-0.4.1/src/lxterminal.c:1022:12: style: Variable 'activeterm' can be declared as pointer to const [constVariablePointer] 2.18.0 lxterminal-0.4.1/src/lxterminal.c:1031:57: error: Allocation with g_strconcat, gtk_label_set_markup doesn't release it. [leakNoVarFunctionCall] 2.18.0 lxterminal-0.4.1/src/lxterminal.c:1033:57: error: Allocation with g_strconcat, gtk_label_set_markup doesn't release it. [leakNoVarFunctionCall] 2.18.0 lxterminal-0.4.1/src/lxterminal.c:1049:24: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GDK_BUTTON_PRESS [valueFlowBailoutIncompleteVar] 2.18.0 lxterminal-0.4.1/src/lxterminal.c:1121:114: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable VTE_CURSOR_BLINK_OFF [valueFlowBailoutIncompleteVar] 2.18.0 lxterminal-0.4.1/src/lxterminal.c:1195:17: style: gtk_hbox_new has been deprecated since version 3.2 and should not be used in newly-written code. You can use gtk_box_new() with GTK_ORIENTATION_HORIZONTAL instead, which is a quick and easy change. But the recommendation is to switch to GtkGrid, since GtkBox is going to go away eventually. See Migrating from other containers to GtkGrid. [prohibitedgtk_hbox_newCalled] 2.18.0 lxterminal-0.4.1/src/lxterminal.c:1219:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LC_ALL [valueFlowBailoutIncompleteVar] 2.18.0 lxterminal-0.4.1/src/lxterminal.c:1257:24: style: gtk_hbox_new has been deprecated since version 3.2 and should not be used in newly-written code. You can use gtk_box_new() with GTK_ORIENTATION_HORIZONTAL instead, which is a quick and easy change. But the recommendation is to switch to GtkGrid, since GtkBox is going to go away eventually. See Migrating from other containers to GtkGrid. [prohibitedgtk_hbox_newCalled] 2.18.0 lxterminal-0.4.1/src/lxterminal.c:1368:5: error: Mismatching allocation and deallocation: exec [mismatchAllocDealloc] lxterminal-0.4.1/src/lxterminal.c:1336:16: note: Mismatching allocation and deallocation: exec lxterminal-0.4.1/src/lxterminal.c:1368:5: note: Mismatching allocation and deallocation: exec 2.18.0 lxterminal-0.4.1/src/lxterminal.c:1405:69: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GETTEXT_PACKAGE [valueFlowBailoutIncompleteVar] 2.18.0 lxterminal-0.4.1/src/lxterminal.c:1500:27: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable WidthValue [valueFlowBailoutIncompleteVar] 2.18.0 lxterminal-0.4.1/src/lxterminal.c:1571:39: warning: Uninitialized variable: cmd_len [uninitvar] lxterminal-0.4.1/src/lxterminal.c:1459:17: note: Assuming condition is false lxterminal-0.4.1/src/lxterminal.c:1571:39: note: Uninitialized variable: cmd_len 2.18.0 lxterminal-0.4.1/src/lxterminal.c:1635:39: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GTK_WINDOW_TOPLEVEL [valueFlowBailoutIncompleteVar] 2.18.0 lxterminal-0.4.1/src/lxterminal.c:1668:21: style: gtk_vbox_new has been deprecated since version 3.2 and should not be used in newly-written code. You can use gtk_box_new() with GTK_ORIENTATION_VERTICAL instead, which is a quick and easy change. But the recommendation is to switch to GtkGrid, since GtkBox is going to go away eventually. See Migrating from other containers to GtkGrid. [prohibitedgtk_vbox_newCalled] 2.18.0 lxterminal-0.4.1/src/lxterminal.c:1797:16: style: Variable 'token' can be declared as pointer to const [constVariablePointer] 2.18.0 lxterminal-0.4.1/src/lxterminal.c:1797:24: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] 2.18.0 lxterminal-0.4.1/src/lxterminal.c:1800:17: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] 2.18.0 lxterminal-0.4.1/src/lxterminal.c:1805:21: portability: Non reentrant function 'strtok' called. For threadsafe applications it is recommended to use the reentrant replacement function 'strtok_r'. [prohibitedstrtokCalled] 2.18.0 lxterminal-0.4.1/src/lxterminal.c:1913:51: style: Parameter 'setting' can be declared as pointer to const [constParameterPointer] 2.18.0 lxterminal-0.4.1/src/lxterminal.c:1916:19: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable accelerator [valueFlowBailoutIncompleteVar] 2.18.0 lxterminal-0.4.1/src/lxterminal.c:224:54: style: Parameter 'terminal' can be declared as pointer to const [constParameterPointer] 2.18.0 lxterminal-0.4.1/src/lxterminal.c:251:18: style: Condition 'proc_cwd==NULL' is always true [knownConditionTrueFalse] lxterminal-0.4.1/src/lxterminal.c:226:24: note: Assignment 'proc_cwd=NULL', assigned value is 0 lxterminal-0.4.1/src/lxterminal.c:251:18: note: Condition 'proc_cwd==NULL' is always true 2.18.0 lxterminal-0.4.1/src/lxterminal.c:275:10: portability: Non reentrant function 'getpwuid' called. For threadsafe applications it is recommended to use the reentrant replacement function 'getpwuid_r'. [prohibitedgetpwuidCalled] 2.18.0 lxterminal-0.4.1/src/lxterminal.c:308:75: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GTK_ACCEL_LOCKED [valueFlowBailoutIncompleteVar] head lxterminal-0.4.1/src/lxterminal.c:37:0: error: failed to evaluate #if condition, undefined function-like macro invocation: VTE_CHECK_VERSION( ... ) [preprocessorErrorDirective] head lxterminal-0.4.1/src/lxterminal.c:37:2: error: failed to evaluate #if condition, undefined function-like macro invocation: VTE_CHECK_VERSION( ... ) [preprocessorErrorDirective] 2.18.0 lxterminal-0.4.1/src/lxterminal.c:403:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GDK_HINT_MIN_SIZE [valueFlowBailoutIncompleteVar] 2.18.0 lxterminal-0.4.1/src/lxterminal.c:500:16: style: Variable 'term' can be declared as pointer to const [constVariablePointer] 2.18.0 lxterminal-0.4.1/src/lxterminal.c:554:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GTK_RESPONSE_OK [valueFlowBailoutIncompleteVar] 2.18.0 lxterminal-0.4.1/src/lxterminal.c:607:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GTK_RESPONSE_CANCEL [valueFlowBailoutIncompleteVar] 2.18.0 lxterminal-0.4.1/src/lxterminal.c:732:33: warning: Uninitialized variables: term.parent, term.index, term.tab, term.label, term.user_specified_label, term.close_button, term.box, term.vte, term.scrollbar, term.pid, term.closure, term.matched_url, term.open_menu_on_button_release, term.exit_handler_id [uninitvar] lxterminal-0.4.1/src/lxterminal.c:726:19: note: Assuming condition is false lxterminal-0.4.1/src/lxterminal.c:732:33: note: Uninitialized variables: term.parent, term.index, term.tab, term.label, term.user_specified_label, term.close_button, term.box, term.vte, term.scrollbar, term.pid, term.closure, term.matched_url, term.open_menu_on_button_release, term.exit_handler_id 2.18.0 lxterminal-0.4.1/src/lxterminal.c:782:63: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable VERSION [valueFlowBailoutIncompleteVar] 2.18.0 lxterminal-0.4.1/src/lxterminal.c:850:47: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GTK_DIALOG_MODAL [valueFlowBailoutIncompleteVar] 2.18.0 lxterminal-0.4.1/src/lxterminal.c:945:86: style: Parameter 'event' can be declared as pointer to const. However it seems that 'terminal_tab_button_press_event' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lxterminal-0.4.1/src/lxterminal.c:1371:5: note: You might need to cast the function pointer here lxterminal-0.4.1/src/lxterminal.c:945:86: note: Parameter 'event' can be declared as pointer to const 2.18.0 lxterminal-0.4.1/src/lxterminal.c:956:86: style: Parameter 'event' can be declared as pointer to const [constParameterPointer] 2.18.0 lxterminal-0.4.1/src/lxterminal.c:982:59: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GETTEXT_PACKAGE [valueFlowBailoutIncompleteVar] 2.18.0 lxterminal-0.4.1/src/preferences.c:198:43: style: Parameter 'position' can be declared as pointer to const [constParameterPointer] 2.18.0 lxterminal-0.4.1/src/preferences.c:233:95: style: Parameter 'ekey' can be declared as pointer to const. However it seems that 'preferences_dialog_shortcut_key_press_event' is a callback function, if 'ekey' is declared with const you might also need to cast function pointer(s). [constParameterCallback] lxterminal-0.4.1/src/preferences.c:483:5: note: You might need to cast the function pointer here lxterminal-0.4.1/src/preferences.c:233:95: note: Parameter 'ekey' can be declared as pointer to const 2.18.0 lxterminal-0.4.1/src/preferences.c:241:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GDK_KEY_Tab [valueFlowBailoutIncompleteVar] 2.18.0 lxterminal-0.4.1/src/preferences.c:286:47: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable PACKAGE_DATA_DIR [valueFlowBailoutIncompleteVar] 2.18.0 lxterminal-0.4.1/src/setting.c:172:28: style:inconclusive: Function 'set_setting' argument 1 names different: declaration 'setting' definition 'new_setting'. [funcArgNamesDifferent] lxterminal-0.4.1/src/setting.h:156:35: note: Function 'set_setting' argument 1 names different: declaration 'setting' definition 'new_setting'. lxterminal-0.4.1/src/setting.c:172:28: note: Function 'set_setting' argument 1 names different: declaration 'setting' definition 'new_setting'. 2.18.0 lxterminal-0.4.1/src/setting.c:267:36: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable O_CREAT [valueFlowBailoutIncompleteVar] 2.18.0 lxterminal-0.4.1/src/setting.c:347:31: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable S_IRUSR [valueFlowBailoutIncompleteVar] head lxterminal-0.4.1/src/setting.h:90:0: error: failed to evaluate #if condition, undefined function-like macro invocation: VTE_CHECK_VERSION( ... ) [preprocessorErrorDirective] head lxterminal-0.4.1/src/setting.h:90:2: error: failed to evaluate #if condition, undefined function-like macro invocation: VTE_CHECK_VERSION( ... ) [preprocessorErrorDirective] 2.18.0 lxterminal-0.4.1/src/tab.c:49:32: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LXTab [valueFlowBailoutIncompleteVar] 2.18.0 lxterminal-0.4.1/src/tab.c:52:17: style: gtk_hbox_new has been deprecated since version 3.2 and should not be used in newly-written code. You can use gtk_box_new() with GTK_ORIENTATION_HORIZONTAL instead, which is a quick and easy change. But the recommendation is to switch to GtkGrid, since GtkBox is going to go away eventually. See Migrating from other containers to GtkGrid. [prohibitedgtk_hbox_newCalled] 2.18.0 lxterminal-0.4.1/src/unixsocket.c:103:50: style: Parameter 'sock_addr' can be declared as pointer to const [constParameterPointer] 2.18.0 lxterminal-0.4.1/src/unixsocket.c:103:75: style: Parameter 'lxtermwin' can be declared as pointer to const [constParameterPointer] 2.18.0 lxterminal-0.4.1/src/unixsocket.c:106:61: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] 2.18.0 lxterminal-0.4.1/src/unixsocket.c:173:21: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_IO_IN [valueFlowBailoutIncompleteVar] 2.18.0 lxterminal-0.4.1/src/unixsocket.c:188:53: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] 2.18.0 lxterminal-0.4.1/src/unixsocket.c:210:1: error: Memory leak: info [memleak] 2.18.0 lxterminal-0.4.1/src/unixsocket.c:220:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_IO_STATUS_ERROR [valueFlowBailoutIncompleteVar] 2.18.0 lxterminal-0.4.1/src/unixsocket.c:76:60: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] DONE