2024-04-23 16:45 ftp://ftp.de.debian.org/debian/pool/main/a/aylet/aylet_0.5.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 -D__GNUC__ --platform=unix64 -j1 platform: Linux-5.15.0-105-generic-x86_64-with-glibc2.35 python: 3.10.12 client-version: 1.3.56 compiler: g++ (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0 cppcheck: head 2.14.0 head-info: 24be0e5 (2024-04-23 14:04:36 +0200) count: 59 59 elapsed-time: 48.2 56.7 head-timing-info: old-timing-info: head results: aylet-0.5/main.c:626:15: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] aylet-0.5/main.c:737:1: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable opterr [valueFlowBailoutIncompleteVar] aylet-0.5/main.c:840:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] aylet-0.5/main.c:882:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] aylet-0.5/main.c:383:3: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] aylet-0.5/main.c:449:7: style: Local variable 'in' shadows outer function [shadowFunction] aylet-0.5/main.h:31:21: note: Shadowed declaration aylet-0.5/main.c:449:7: note: Shadow variable aylet-0.5/main.c:447:24: style: Parameter 'filename' can be declared as pointer to const [constParameterPointer] aylet-0.5/main.c:830:7: style: Variable 'ptr' can be declared as pointer to const [constVariablePointer] aylet-0.5/sound.c:698:3: style: Obsolescent function 'usleep' called. It is recommended to use 'nanosleep' or 'setitimer' instead. [prohibitedusleepCalled] aylet-0.5/sound.c:123:12: style: Variable 'levels' can be declared as const array [constVariable] aylet-0.5/ui.c:25:8: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdscr [valueFlowBailoutIncompleteVar] aylet-0.5/ui.c:148:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] aylet-0.5/ui.c:253:13: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable SA_RESTART [valueFlowBailoutIncompleteVar] aylet-0.5/ui.c:274:8: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stdscr [valueFlowBailoutIncompleteVar] aylet-0.5/ui.c:299:6: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable LINES [valueFlowBailoutIncompleteVar] aylet-0.5/ui.c:83:16: warning: Either the condition 'str' is redundant or there is possible null pointer dereference: str. [nullPointerRedundantCheck] aylet-0.5/ui.c:89:4: note: Assuming that condition 'str' is not redundant aylet-0.5/ui.c:83:16: note: Null pointer dereference aylet-0.5/ui.c:47:6: style: Redundant initialization for 'y'. The initialized value is overwritten before it is read. [redundantInitialization] aylet-0.5/ui.c:32:6: note: y is initialized aylet-0.5/ui.c:47:6: note: y is overwritten aylet-0.5/ui.c:80:29: style: Parameter 'str' can be declared as pointer to const [constParameterPointer] aylet-0.5/ui.c:145:11: style: Variable 'filename' can be declared as pointer to const [constVariablePointer] aylet-0.5/ui.c:146:11: style: Variable 'ptr' can be declared as pointer to const [constVariablePointer] aylet-0.5/uigtk.c:84:26: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GDK_SHIFT_MASK [valueFlowBailoutIncompleteVar] aylet-0.5/uigtk.c:110:23: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable GTK_WINDOW_TOPLEVEL [valueFlowBailoutIncompleteVar] aylet-0.5/uigtk.c:417:11: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable stderr [valueFlowBailoutIncompleteVar] aylet-0.5/uigtk.c:111:1: style: Obsolete function 'gtk_signal_connect' called. It is recommended to use 'g_signal_connect' instead. [prohibitedgtk_signal_connectCalled] aylet-0.5/uigtk.c:113:1: style: Obsolete function 'gtk_signal_connect' called. It is recommended to use 'g_signal_connect' instead. [prohibitedgtk_signal_connectCalled] aylet-0.5/uigtk.c:120:6: 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] aylet-0.5/uigtk.c:201:1: style: Obsolete function 'gtk_signal_connect' called. It is recommended to use 'g_signal_connect' instead. [prohibitedgtk_signal_connectCalled] aylet-0.5/uigtk.c:231:6: 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] aylet-0.5/uigtk.c:250:1: style: Obsolete function 'gtk_signal_connect' called. It is recommended to use 'g_signal_connect' instead. [prohibitedgtk_signal_connectCalled] aylet-0.5/uigtk.c:261:1: style: Obsolete function 'gtk_signal_connect' called. It is recommended to use 'g_signal_connect' instead. [prohibitedgtk_signal_connectCalled] aylet-0.5/uigtk.c:271:1: style: Obsolete function 'gtk_signal_connect' called. It is recommended to use 'g_signal_connect' instead. [prohibitedgtk_signal_connectCalled] aylet-0.5/uigtk.c:281:1: style: Obsolete function 'gtk_signal_connect' called. It is recommended to use 'g_signal_connect' instead. [prohibitedgtk_signal_connectCalled] aylet-0.5/uigtk.c:291:1: style: Obsolete function 'gtk_signal_connect' called. It is recommended to use 'g_signal_connect' instead. [prohibitedgtk_signal_connectCalled] aylet-0.5/uigtk.c:300:1: style: Obsolete function 'gtk_signal_connect' called. It is recommended to use 'g_signal_connect' instead. [prohibitedgtk_signal_connectCalled] aylet-0.5/uigtk.c:312:1: style: Obsolete function 'gtk_signal_connect' called. It is recommended to use 'g_signal_connect' instead. [prohibitedgtk_signal_connectCalled] aylet-0.5/uigtk.c:319:1: style: Obsolete function 'gtk_signal_connect' called. It is recommended to use 'g_signal_connect' instead. [prohibitedgtk_signal_connectCalled] aylet-0.5/uigtk.c:67:46: style: Parameter 'event' can be declared as pointer to const. However it seems that 'keypress' is a callback function, if 'event' is declared with const you might also need to cast function pointer(s). [constParameterCallback] aylet-0.5/uigtk.c:114:20: note: You might need to cast the function pointer here aylet-0.5/uigtk.c:67:46: note: Parameter 'event' can be declared as pointer to const aylet-0.5/uigtk.c:329:34: style: Parameter 'filename' can be declared as pointer to const [constParameterPointer] aylet-0.5/uigtk.c:329:49: style: Parameter 'misc' can be declared as pointer to const [constParameterPointer] aylet-0.5/uigtk.c:330:34: style: Parameter 'author' can be declared as pointer to const [constParameterPointer] aylet-0.5/uigtk.c:330:57: style: Parameter 'playingstr' can be declared as pointer to const [constParameterPointer] aylet-0.5/uigtk.c:333:7: style: Variable 'ptr' can be declared as pointer to const [constVariablePointer] aylet-0.5/z80ops.c:134:7: style: Condition '!++c' is always false [knownConditionTrueFalse] aylet-0.5/z80ops.c:204:7: style: Condition '!++e' is always false [knownConditionTrueFalse] aylet-0.5/z80ops.c:288:19: style: Condition '!++l' is always false [knownConditionTrueFalse] aylet-0.5/edops.c:345:8: style: Condition '!++l' is always false [knownConditionTrueFalse] aylet-0.5/edops.c:346:8: style: Condition '!++e' is always false [knownConditionTrueFalse] aylet-0.5/edops.c:355:8: style: Condition '!++l' is always false [knownConditionTrueFalse] aylet-0.5/edops.c:365:8: style: Condition '!++l' is always false [knownConditionTrueFalse] aylet-0.5/edops.c:377:8: style: Condition '!++l' is always false [knownConditionTrueFalse] aylet-0.5/edops.c:427:8: style: Condition '!++l' is always false [knownConditionTrueFalse] aylet-0.5/edops.c:428:8: style: Condition '!++e' is always false [knownConditionTrueFalse] aylet-0.5/edops.c:438:8: style: Condition '!++l' is always false [knownConditionTrueFalse] aylet-0.5/edops.c:449:8: style: Condition '!++l' is always false [knownConditionTrueFalse] aylet-0.5/edops.c:459:8: style: Condition '!++l' is always false [knownConditionTrueFalse] aylet-0.5/z80.c:47:29: style: Parameter 'data' can be declared as pointer to const [constParameterPointer] aylet-0.5/z80.c:47:49: style: Parameter 'stacketc' can be declared as pointer to const [constParameterPointer] aylet-0.5/z80.c:60:7: style: Variable 'ixoriy' is assigned a value that is never used. [unreadVariable] aylet-0.5/z80ops.c:122:1: error: syntax error: keyword 'break' is not allowed in global scope [syntaxError] diff: DONE