2025-08-31 03:35 ftp://ftp.de.debian.org/debian/pool/main/g/gmrun/gmrun_1.4w.orig.tar.xz 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: 48 59 elapsed-time: 0.2 0.2 head-timing-info: old-timing-info: head results: gmrun-1.4w/src/main.c:811:0: error: failed to evaluate #if condition, undefined function-like macro invocation: GTK_CHECK_VERSION( ... ) [preprocessorErrorDirective] gmrun-1.4w/src/main.c:811:2: error: failed to evaluate #if condition, undefined function-like macro invocation: GTK_CHECK_VERSION( ... ) [preprocessorErrorDirective] gmrun-1.4w/src/history.c:166:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] gmrun-1.4w/src/history.c:196:10: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] gmrun-1.4w/src/history.c:198:7: warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint] gmrun-1.4w/src/history.c:98:7: warning: If memory allocation fails, then there is a possible null pointer dereference: item [nullPointerOutOfMemory] gmrun-1.4w/src/history.c:96:21: note: Assuming allocation function fails gmrun-1.4w/src/history.c:96:21: note: Assignment 'item=strdup(p)', assigned value is 0 gmrun-1.4w/src/history.c:98:7: note: Null pointer dereference gmrun-1.4w/src/history.c:147:4: warning: If memory allocation fails, then there is a possible null pointer dereference: history [nullPointerOutOfMemory] gmrun-1.4w/src/history.c:146:35: note: Assuming allocation function fails gmrun-1.4w/src/history.c:146:35: note: Assignment 'history=calloc(1,sizeof(struct HistoryFile))', assigned value is 0 gmrun-1.4w/src/history.c:147:4: note: Null pointer dereference gmrun-1.4w/src/history.c:272:7: style: Statements following 'return' will never be executed. [unreachableCode] gmrun-1.4w/src/gtkcompletionline.c:185:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_TYPE_POINTER [valueFlowBailoutIncompleteVar] gmrun-1.4w/src/gtkcompletionline.c:226:44: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GDK_SCROLL_MASK [valueFlowBailoutIncompleteVar] gmrun-1.4w/src/gtkcompletionline.c:264:4: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable gtk_completion_line_parent_class [valueFlowBailoutIncompleteVar] gmrun-1.4w/src/gtkcompletionline.c:277:4: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable gtk_completion_line_parent_class [valueFlowBailoutIncompleteVar] gmrun-1.4w/src/gtkcompletionline.c:484:83: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable d_name [valueFlowBailoutIncompleteVar] gmrun-1.4w/src/gtkcompletionline.c:536:48: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable d_name [valueFlowBailoutIncompleteVar] gmrun-1.4w/src/gtkcompletionline.c:684:40: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GTK_WINDOW_POPUP [valueFlowBailoutIncompleteVar] gmrun-1.4w/src/gtkcompletionline.c:929:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GDK_SCROLL [valueFlowBailoutIncompleteVar] gmrun-1.4w/src/gtkcompletionline.c:974:20: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable Control_R [valueFlowBailoutIncompleteVar] gmrun-1.4w/src/history.c:296:14: style: Local variable 'ientry' shadows outer variable [shadowVariable] gmrun-1.4w/src/history.c:285:11: note: Shadowed declaration gmrun-1.4w/src/history.c:296:14: note: Shadow variable gmrun-1.4w/src/history.c:74:11: style: Variable 'p' can be declared as pointer to const [constVariablePointer] gmrun-1.4w/src/history.c:285:11: style: Variable 'ientry' can be declared as pointer to const [constVariablePointer] gmrun-1.4w/src/history.c:296:14: style: Variable 'ientry' can be declared as pointer to const [constVariablePointer] gmrun-1.4w/src/config_prefs.c:74:44: warning: If memory allocation fails, then there is a possible null pointer dereference: item [nullPointerOutOfMemory] gmrun-1.4w/src/config_prefs.c:171:45: note: Assuming allocation function fails gmrun-1.4w/src/config_prefs.c:171:24: note: Assignment 'item_out=(struct pref_item*)calloc(1,sizeof(struct pref_item))', assigned value is 0 gmrun-1.4w/src/config_prefs.c:174:50: note: Calling function 'config_replace_key', 2nd argument 'item_out' value is 0 gmrun-1.4w/src/config_prefs.c:74:44: note: Null pointer dereference gmrun-1.4w/src/config_prefs.c:137:7: warning: If memory allocation fails, then there is a possible null pointer dereference: item [nullPointerOutOfMemory] gmrun-1.4w/src/config_prefs.c:135:35: note: Assuming allocation function fails gmrun-1.4w/src/config_prefs.c:135:14: note: Assignment 'item=(struct pref_item*)calloc(1,sizeof(struct pref_item))', assigned value is 0 gmrun-1.4w/src/config_prefs.c:137:7: note: Null pointer dereference gmrun-1.4w/src/config_prefs.c:138:7: warning: If memory allocation fails, then there is a possible null pointer dereference: item [nullPointerOutOfMemory] gmrun-1.4w/src/config_prefs.c:135:35: note: Assuming allocation function fails gmrun-1.4w/src/config_prefs.c:135:14: note: Assignment 'item=(struct pref_item*)calloc(1,sizeof(struct pref_item))', assigned value is 0 gmrun-1.4w/src/config_prefs.c:138:7: note: Null pointer dereference gmrun-1.4w/src/config_prefs.c:140:13: warning: If memory allocation fails, then there is a possible null pointer dereference: item [nullPointerOutOfMemory] gmrun-1.4w/src/config_prefs.c:135:35: note: Assuming allocation function fails gmrun-1.4w/src/config_prefs.c:135:14: note: Assignment 'item=(struct pref_item*)calloc(1,sizeof(struct pref_item))', assigned value is 0 gmrun-1.4w/src/config_prefs.c:140:13: note: Null pointer dereference gmrun-1.4w/src/config_prefs.c:172:13: warning: If memory allocation fails, then there is a possible null pointer dereference: item_out [nullPointerOutOfMemory] gmrun-1.4w/src/config_prefs.c:171:45: note: Assuming allocation function fails gmrun-1.4w/src/config_prefs.c:171:24: note: Assignment 'item_out=(struct pref_item*)calloc(1,sizeof(struct pref_item))', assigned value is 0 gmrun-1.4w/src/config_prefs.c:172:13: note: Null pointer dereference gmrun-1.4w/src/config_prefs.c:173:13: warning: If memory allocation fails, then there is a possible null pointer dereference: item_out [nullPointerOutOfMemory] gmrun-1.4w/src/config_prefs.c:171:45: note: Assuming allocation function fails gmrun-1.4w/src/config_prefs.c:171:24: note: Assignment 'item_out=(struct pref_item*)calloc(1,sizeof(struct pref_item))', assigned value is 0 gmrun-1.4w/src/config_prefs.c:173:13: note: Null pointer dereference gmrun-1.4w/src/config_prefs.c:204:20: warning: If memory allocation fails, then there is a possible null pointer dereference: pre [nullPointerOutOfMemory] gmrun-1.4w/src/config_prefs.c:203:20: note: Assuming allocation function fails gmrun-1.4w/src/config_prefs.c:203:20: note: Assignment 'pre=strdup(txt)', assigned value is 0 gmrun-1.4w/src/config_prefs.c:204:20: note: Null pointer dereference gmrun-1.4w/src/config_prefs.c:209:17: warning: If memory allocation fails, then there is a possible null pointer dereference: variable [nullPointerOutOfMemory] gmrun-1.4w/src/config_prefs.c:208:22: note: Assuming allocation function fails gmrun-1.4w/src/config_prefs.c:208:22: note: Assignment 'variable=strdup(p+2)', assigned value is 0 gmrun-1.4w/src/config_prefs.c:209:17: note: Null pointer dereference gmrun-1.4w/src/config_prefs.c:55:16: style: Variable 'item' can be declared as pointer to const [constVariablePointer] gmrun-1.4w/src/config_prefs.c:112:11: style: Variable 'stripped' can be declared as pointer to const [constVariablePointer] gmrun-1.4w/src/config_prefs.c:159:16: style: Variable 'item' can be declared as pointer to const [constVariablePointer] gmrun-1.4w/src/config_prefs.c:185:25: style: Variable 'post' can be declared as pointer to const [constVariablePointer] gmrun-1.4w/src/config_prefs.c:187:11: style: Variable 'variable_value' can be declared as pointer to const [constVariablePointer] gmrun-1.4w/src/config_prefs.c:189:11: style: Variable 'p' can be declared as pointer to const [constVariablePointer] gmrun-1.4w/src/config_prefs.c:279:16: style: Variable 'item' can be declared as pointer to const [constVariablePointer] gmrun-1.4w/src/config_prefs.c:295:11: style: Variable 'value' can be declared as pointer to const [constVariablePointer] gmrun-1.4w/src/gtkcompletionline.c:506:31: warning: If memory allocation fails, then there is a possible null pointer dereference: str [nullPointerOutOfMemory] gmrun-1.4w/src/gtkcompletionline.c:505:24: note: Assuming allocation function fails gmrun-1.4w/src/gtkcompletionline.c:505:24: note: Assignment 'str=strdup(path)', assigned value is 0 gmrun-1.4w/src/gtkcompletionline.c:506:31: note: Null pointer dereference gmrun-1.4w/src/gtkcompletionline.c:511:12: warning: If memory allocation fails, then there is a possible null pointer dereference: p [nullPointerOutOfMemory] gmrun-1.4w/src/gtkcompletionline.c:505:24: note: Assuming allocation function fails gmrun-1.4w/src/gtkcompletionline.c:505:24: note: Assignment 'str=strdup(path)', assigned value is 0 gmrun-1.4w/src/gtkcompletionline.c:509:15: note: Assignment 'p=str', assigned value is 0 gmrun-1.4w/src/gtkcompletionline.c:511:12: note: Null pointer dereference gmrun-1.4w/src/gtkcompletionline.c:479:60: error: Null pointer dereference [nullPointer] gmrun-1.4w/src/gtkcompletionline.c:532:53: error: Null pointer dereference [nullPointer] gmrun-1.4w/src/gtkcompletionline.c:92:21: style: Variable 'object_class' can be declared as pointer to const [constVariablePointer] gmrun-1.4w/src/gtkcompletionline.c:439:10: style: Variable 'path_cstr' can be declared as pointer to const [constVariablePointer] gmrun-1.4w/src/gtkcompletionline.c:509:11: style: Variable 'p' can be declared as pointer to const [constVariablePointer] gmrun-1.4w/src/gtkcompletionline.c:516:11: style: Variable 'dir' can be declared as pointer to const [constVariablePointer] gmrun-1.4w/src/gtkcompletionline.c:579:66: style: Parameter 'cword' can be declared as pointer to const [constParameterPointer] gmrun-1.4w/src/gtkcompletionline.c:925:50: style: Parameter 'event' can be declared as pointer to const. However it seems that 'on_scroll' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s). [constParameterCallback] gmrun-1.4w/src/gtkcompletionline.c:231:4: note: You might need to cast the function pointer here gmrun-1.4w/src/gtkcompletionline.c:925:50: note: Parameter 'event' can be declared as pointer to const gmrun-1.4w/src/gtkcompletionline.c:437:10: style: Variable 'i' is assigned a value that is never used. [unreadVariable] diff: 2.18.0 gmrun-1.4w/src/main.c:125:55: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable errno [valueFlowBailoutIncompleteVar] 2.18.0 gmrun-1.4w/src/main.c:240:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_SOURCE_REMOVE [valueFlowBailoutIncompleteVar] 2.18.0 gmrun-1.4w/src/main.c:261:48: style: Parameter 'cl' can be declared as pointer to const. However it seems that 'on_search_mode' is a callback function, if 'cl' is declared with const you might also need to cast function pointer(s). [constParameterCallback] gmrun-1.4w/src/main.c:619:4: note: You might need to cast the function pointer here gmrun-1.4w/src/main.c:261:48: note: Parameter 'cl' can be declared as pointer to const 2.18.0 gmrun-1.4w/src/main.c:274:50: style: Parameter 'cl' can be declared as pointer to const. However it seems that 'on_search_letter' is a callback function, if 'cl' is declared with const you might also need to cast function pointer(s). [constParameterCallback] gmrun-1.4w/src/main.c:623:4: note: You might need to cast the function pointer here gmrun-1.4w/src/main.c:274:50: note: Parameter 'cl' can be declared as pointer to const 2.18.0 gmrun-1.4w/src/main.c:283:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_SOURCE_REMOVE [valueFlowBailoutIncompleteVar] 2.18.0 gmrun-1.4w/src/main.c:352:42: style: Variable 'chosen_url' can be declared as pointer to const [constVariablePointer] 2.18.0 gmrun-1.4w/src/main.c:422:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_FILE_TEST_IS_EXECUTABLE [valueFlowBailoutIncompleteVar] 2.18.0 gmrun-1.4w/src/main.c:454:11: style: Variable 'ext' can be declared as pointer to const [constVariablePointer] 2.18.0 gmrun-1.4w/src/main.c:531:66: style: Parameter 'alloc' can be declared as pointer to const. However it seems that 'cb_dialog_size_allocate' is a callback function, if 'alloc' is declared with const you might also need to cast function pointer(s). [constParameterCallback] gmrun-1.4w/src/main.c:570:7: note: You might need to cast the function pointer here gmrun-1.4w/src/main.c:531:66: note: Parameter 'alloc' can be declared as pointer to const 2.18.0 gmrun-1.4w/src/main.c:538:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_MAXINT [valueFlowBailoutIncompleteVar] 2.18.0 gmrun-1.4w/src/main.c:564:38: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GDK_DECOR_BORDER [valueFlowBailoutIncompleteVar] 2.18.0 gmrun-1.4w/src/main.c:691:29: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable G_OPTION_ARG_STRING [valueFlowBailoutIncompleteVar] 2.18.0 gmrun-1.4w/src/main.c:701:47: warning: Either the condition 'error' is redundant or there is possible null pointer dereference: error. [nullPointerRedundantCheck] gmrun-1.4w/src/main.c:703:11: note: Assuming that condition 'error' is not redundant gmrun-1.4w/src/main.c:701:47: note: Null pointer dereference head gmrun-1.4w/src/main.c:811:0: error: failed to evaluate #if condition, undefined function-like macro invocation: GTK_CHECK_VERSION( ... ) [preprocessorErrorDirective] head gmrun-1.4w/src/main.c:811:2: error: failed to evaluate #if condition, undefined function-like macro invocation: GTK_CHECK_VERSION( ... ) [preprocessorErrorDirective] DONE