While testing to enable a CI for clang-tidy and cppcheck, I was presented with the following warnings:
cppcheck results: /github/workspace/demos/newtest.c:554:31: style: Variable 'new_color' is assigned a value that is never used. [unreadVariable]
/github/workspace/demos/newtest.c:589:62: style: Suspicious calculation. Please use parentheses to clarify the code. The code ''a&b?c:d'' should be written as either ''(a&b)?c:d'' or ''a&(b?c:d)''. [clarifyCalculation]
/github/workspace/demos/newtest.c:593:60: style: Suspicious calculation. Please use parentheses to clarify the code. The code ''a&b?c:d'' should be written as either ''(a&b)?c:d'' or ''a&(b?c:d)''. [clarifyCalculation]
/github/workspace/demos/ozdemo.c:116:12: style: The scope of the variable 'c1' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/demos/ozdemo.c:116:16: style: The scope of the variable 'c2' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/demos/ozdemo.c:116:20: style: The scope of the variable 'c3' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/demos/ptest.c:106:24: style: Parameter 'pan' can be declared as pointer to const [constParameterPointer]
/github/workspace/demos/testcurs.c:1141:15: style: Variable 'c' is assigned a value that is never used. [unreadVariable]
/github/workspace/demos/testcurs.c:1407:23: style: Variable 'tmarg' is assigned a value that is never used. [unreadVariable]
/github/workspace/demos/tui.c:84:9: style: The scope of the variable 'i' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/demos/tui.c:182:12: style: The scope of the variable 'l' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/demos/tui.c:249:44: style: The scope of the variable 'c' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/demos/tui.c:759:54: style: The scope of the variable 'l' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/demos/tui.c:71:27: style: Parameter 's' can be declared as pointer to const [constParameterPointer]
/github/workspace/demos/tui.c:166:16: style: Variable 'tp' can be declared as pointer to const [constVariablePointer]
/github/workspace/demos/tui.c:392:20: style: Parameter 'msg' can be declared as pointer to const [constParameterPointer]
/github/workspace/demos/tui.c:742:27: style: Parameter 'win' can be declared as pointer to const [constParameterPointer]
/github/workspace/demos/tuidemo.c:75:9: style: The scope of the variable 'i' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/demos/tuidemo.c:78:10: style: The scope of the variable 'ateof' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/demos/tuidemo.c:73:21: style: Parameter 'fname' can be declared as pointer to const [constParameterPointer]
/github/workspace/demos/worm.c:338:21: error: Common realloc mistake: 'ref' nulled but not freed upon failure [memleakOnRealloc]
/github/workspace/demos/xmas.c:822:19: warning: Opposite inner 'if' condition leads to a dead code block (outer condition is 'x_pos>62' and inner condition is 'x_pos<62'). [oppositeInnerCondition]
/github/workspace/demos/xmas.c:820:28: note: outer condition: x_pos>62
/github/workspace/demos/xmas.c:822:19: note: opposite inner condition: x_pos<62
/github/workspace/gl/pdcdisp.c:649:33: warning: The address of variable 'tch' might be accessed at non-zero index. [objectIndex]
/github/workspace/gl/pdcdisp.c:642:16: note: Address of variable taken here.
/github/workspace/gl/pdcdisp.c:649:33: note: The address of variable 'tch' might be accessed at non-zero index.
/github/workspace/gl/pdcdisp.c:561:39: style: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck]
/github/workspace/gl/pdcdisp.c:564:37: style: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck]
/github/workspace/gl/pdcdisp.c:561:25: style: Condition 'bold' is always false [knownConditionTrueFalse]
/github/workspace/gl/pdcdisp.c:558:16: note: Assignment 'bold=0', assigned value is 0
/github/workspace/gl/pdcdisp.c:561:25: note: Condition 'bold' is always false
/github/workspace/gl/pdcdisp.c:561:42: style: Condition 'italic' is always false [knownConditionTrueFalse]
/github/workspace/gl/pdcdisp.c:559:18: note: Assignment 'italic=0', assigned value is 0
/github/workspace/gl/pdcdisp.c:561:42: note: Condition 'italic' is always false
/github/workspace/gl/pdcdisp.c:564:10: style: Condition 'bold' is always false [knownConditionTrueFalse]
/github/workspace/gl/pdcdisp.c:558:16: note: Assignment 'bold=0', assigned value is 0
/github/workspace/gl/pdcdisp.c:564:10: note: Condition 'bold' is always false
/github/workspace/gl/pdcdisp.c:564:40: style: Condition 'italic' is always false [knownConditionTrueFalse]
/github/workspace/gl/pdcdisp.c:559:18: note: Assignment 'italic=0', assigned value is 0
/github/workspace/gl/pdcdisp.c:564:40: note: Condition 'italic' is always false
/github/workspace/gl/pdcdisp.c:161:9: error: Common realloc mistake: 'pdc_glyph_start_col' nulled but not freed upon failure [memleakOnRealloc]
/github/workspace/gl/pdcdisp.c:322:13: error: Common realloc mistake: 'glyph_grid_layers' nulled but not freed upon failure [memleakOnRealloc]
/github/workspace/gl/pdcdisp.c:464:14: error: Common realloc mistake: 'cache' nulled but not freed upon failure [memleakOnRealloc]
/github/workspace/gl/pdcdisp.c:794:10: style: Redundant initialization for 'hcol'. The initialized value is overwritten before it is read. [redundantInitialization]
/github/workspace/gl/pdcdisp.c:673:16: note: hcol is initialized
/github/workspace/gl/pdcdisp.c:794:10: note: hcol is overwritten
/github/workspace/gl/pdcdisp.c:92:12: style: The scope of the variable 'j' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/gl/pdcdisp.c:92:15: style: The scope of the variable 'layer' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/gl/pdcdisp.c:289:9: style: The scope of the variable 'i' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/gl/pdcdisp.c:289:12: style: The scope of the variable 'j' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/gl/pdcdisp.c:289:15: style: The scope of the variable 'layer' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/common/blink.c:8:16: style: Variable 'tptr' can be declared as pointer to const [constVariablePointer]
/github/workspace/gl/pdcdisp.c:645:16: warning: Uninitialized variable: *srcp [uninitvar]
/github/workspace/gl/pdcdisp.c:634:11: note: Assuming condition is false
/github/workspace/gl/pdcdisp.c:645:16: note: Uninitialized variable: *srcp
/github/workspace/gl/pdckbd.c:253:29: warning: Invalid strchr() argument nr 2. The value is -1 but the valid values are '0:255'. [invalidFunctionArg]
/github/workspace/gl/pdckbd.c:251:28: note: Assignment 'rval=key>0x7f?-1:_handle_alt_keys(key)', assigned value is -1
/github/workspace/gl/pdckbd.c:253:29: note: Invalid argument
/github/workspace/common/pdccolor.c:107:7: error: Common realloc mistake: 'rgbs' nulled but not freed upon failure [memleakOnRealloc]
/github/workspace/common/pdccolor.c:96:14: style: The scope of the variable 'i' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/common/pdccolor.c:134:9: style: The scope of the variable 'rgb' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/gl/pdcscrn.c:283:9: style: The scope of the variable 'i' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/gl/glfuncs.h:144:5: error: Uninitialized variable: loader [legacyUninitvar]
/github/workspace/pdcurses/attr.c:161:12: style: The scope of the variable 'newcolr' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/pdcurses/attr.c:161:21: style: The scope of the variable 'oldcolr' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/pdcurses/attr.c:161:30: style: The scope of the variable 'newattr' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/pdcurses/attr.c:161:39: style: The scope of the variable 'oldattr' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/pdcurses/border.c:110:38: style: Parameter 'win' can be declared as pointer to const [constParameterPointer]
/github/workspace/pdcurses/color.c:678:9: warning: Either the condition '!SP' is redundant or there is possible null pointer dereference: SP. [nullPointerRedundantCheck]
/github/workspace/pdcurses/color.c:680:9: note: Assuming that condition '!SP' is not redundant
/github/workspace/pdcurses/color.c:678:9: note: Null pointer dereference
/github/workspace/pdcurses/color.c:290:9: style: The scope of the variable 'x' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/pdcurses/color.c:290:12: style: The scope of the variable 'y' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/pdcurses/color.c:320:9: style: The scope of the variable 'x' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/pdcurses/color.c:320:12: style: The scope of the variable 'y' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/pdcurses/color.c:161:15: style: Variable 'curr' can be declared as pointer to const [constVariablePointer]
/github/workspace/pdcurses/color.c:203:17: style: Variable 'p' can be declared as pointer to const [constVariablePointer]
/github/workspace/pdcurses/color.c:479:15: style: Variable 'p' can be declared as pointer to const [constVariablePointer]
/github/workspace/pdcurses/color.c:630:23: style: Variable 'p' can be declared as pointer to const [constVariablePointer]
/github/workspace/pdcurses/color.c:674:15: style: Variable 'p' can be declared as pointer to const [constVariablePointer]
/github/workspace/pdcurses/getstr.c:92:9: style: The scope of the variable 'ch' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/pdcurses/inchstr.c:65:13: style: Variable 'src' can be declared as pointer to const [constVariablePointer]
/github/workspace/pdcurses/initscr.c:360:26: style: Parameter 'new_scr' can be declared as pointer to const [constParameterPointer]
/github/workspace/pdcurses/initscr.c:369:24: style: Parameter 'sp' can be declared as pointer to const [constParameterPointer]
/github/workspace/pdcurses/initscr.c:412:12: style: Variable 'panel_ptr' can be declared as pointer to const [constVariablePointer]
/github/workspace/pdcurses/instr.c:82:13: style: Variable 'src' can be declared as pointer to const [constVariablePointer]
/github/workspace/pdcurses/mouse.c:192:30: style: Parameter 'win' can be declared as pointer to const [constParameterPointer]
/github/workspace/pdcurses/overlay.c:58:24: style: The scope of the variable 'fc' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/pdcurses/overlay.c:59:13: style: The scope of the variable 'w1ptr' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/pdcurses/overlay.c:59:21: style: The scope of the variable 'w2ptr' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/pdcurses/printw.c:85:5: error: va_list 'varglist_copy' used before va_start() was called. [va_list_usedBeforeStarted]
/github/workspace/pdcurses/printw.c:86:46: error: va_list 'varglist_copy' used before va_start() was called. [va_list_usedBeforeStarted]
/github/workspace/pdcurses/printw.c:96:9: error: va_list 'varglist_copy' used before va_start() was called. [va_list_usedBeforeStarted]
/github/workspace/pdcurses/printw.c:97:50: error: va_list 'varglist_copy' used before va_start() was called. [va_list_usedBeforeStarted]
/github/workspace/pdcurses/refresh.c:96:21: style: Variable 'src' can be declared as pointer to const [constVariablePointer]
/github/workspace/pdcurses/refresh.c:251:21: style: Variable 'src' can be declared as pointer to const [constVariablePointer]
/github/workspace/pdcurses/scr_dump.c:118:20: style: Parameter 'win' can be declared as pointer to const [constParameterPointer]
/github/workspace/pdcurses/scroll.c:47:27: style: Variable 'endptr' can be declared as pointer to const [constVariablePointer]
/github/workspace/pdcurses/slk.c:282:26: style: Defensive programming: The variable 'i' is used as an array index before it is checked that is within limits. This can mean that the array might be accessed out of bounds. Reorder conditions such as '(a[i] && i < 10)' to '(i < 10 && a[i])'. That way the array will not be accessed if the index is out of limits. [arrayIndexThenCheck]
/github/workspace/pdcurses/slk.c:449:13: warning: Either the condition '!SP' is redundant or there is possible null pointer dereference: SP. [nullPointerRedundantCheck]
/github/workspace/pdcurses/slk.c:450:9: note: Assuming that condition '!SP' is not redundant
/github/workspace/pdcurses/slk.c:449:13: note: Null pointer dereference
/github/workspace/pdcurses/slk.c:220:9: style: The scope of the variable 'i' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/pdcurses/touch.c:211:9: style: The scope of the variable 'i' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/pdcurses/window.c:530:21: style: Variable 'new_win->_flags' is reassigned a value before the old one has been used. [redundantAssignment]
/github/workspace/pdcurses/window.c:517:21: note: new_win->_flags is assigned
/github/workspace/pdcurses/window.c:530:21: note: new_win->_flags is overwritten
/github/workspace/sdl2/pdcdisp.c:500:33: warning: The address of variable 'tch' might be accessed at non-zero index. [objectIndex]
/github/workspace/sdl2/pdcdisp.c:493:16: note: Address of variable taken here.
/github/workspace/sdl2/pdcdisp.c:500:33: note: The address of variable 'tch' might be accessed at non-zero index.
/github/workspace/sdl2/pdcdisp.c:31:9: style: The scope of the variable 'i' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/sdl2/pdcdisp.c:496:16: warning: Uninitialized variable: *srcp [uninitvar]
/github/workspace/sdl2/pdcdisp.c:485:11: note: Assuming condition is false
/github/workspace/sdl2/pdcdisp.c:496:16: note: Uninitialized variable: *srcp
/github/workspace/sdl2/pdckbd.c:261:29: warning: Invalid strchr() argument nr 2. The value is -1 but the valid values are '0:255'. [invalidFunctionArg]
/github/workspace/sdl2/pdckbd.c:259:28: note: Assignment 'rval=key>0x7f?-1:_handle_alt_keys(key)', assigned value is -1
/github/workspace/sdl2/pdckbd.c:261:29: note: Invalid argument
/github/workspace/sdl2/pdcscrn.c:185:9: style: The scope of the variable 'i' can be reduced. Warning: Be careful when fixing this message, especially when there are inner loops. Here is an example where cppcheck will write that the scope for 'i' can be reduced:
/github/workspace/vt/pdcdisp.c:411:18: style: Variable 'bytes_out' is assigned a value that is never used. [unreadVariable]
/github/workspace/vt/pdckbd.c:66:20: style: Local variable 'timeout' shadows outer function [shadowFunction]
/github/workspace/curses.h:1557:16: note: Shadowed declaration
/github/workspace/vt/pdckbd.c:66:20: note: Shadow variable
/github/workspace/common/mouse.c:194:24: style: Variable 'prev' can be declared as pointer to const [constVariablePointer]
/github/workspace/vt/pdckbd.c:226:4: warning: Uninitialized variable: *modifiers [uninitvar]
/github/workspace/vt/pdckbd.c:194:19: note: Assignment 'modifiers=&dummy', assigned value is <Uninit>
/github/workspace/vt/pdckbd.c:195:17: note: Assuming condition is true
/github/workspace/vt/pdckbd.c:226:4: note: Uninitialized variable: *modifiers
/github/workspace/vt/pdcscrn.c:375:32: style: Condition 'PDC_init_palette()' is always false [knownConditionTrueFalse]
/github/workspace/vt/pdcscrn.c:375:32: note: Calling function 'PDC_init_palette' returns 0
/github/workspace/vt/pdcscrn.c:375:32: note: Condition 'PDC_init_palette()' is always false
/github/workspace/vt/pdcscrn.c:341:11: style: Variable 'term_env' can be declared as pointer to const [constVariablePointer]
clang-tidy results: /github/workspace/pdcurses/clear.c:3:1: warning: #includes are not sorted properly [llvm-include-order]
/github/workspace/pdcurses/clear.c:55:15: warning: no header providing "WINDOW" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/clear.c:58:5: warning: no header providing "chtype" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/clear.c:65:16: warning: no header providing "ERR" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/clear.c:74:5: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops]
/github/workspace/pdcurses/clear.c:74:42: warning: backward branch (for loop) is ID-dependent due to variable reference to 'minx' and may cause performance degradation [altera-id-dependent-backward-branch]
/github/workspace/pdcurses/clear.c:57:5: note: inferred assignment of ID-dependent value from ID-dependent variable x
/github/workspace/pdcurses/clear.c:80:12: warning: no header providing "OK" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/clear.c:87:22: warning: no header providing "stdscr" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/clear.c:109:9: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops]
/github/workspace/pdcurses/clear.c:109:16: warning: backward branch (for loop) is ID-dependent due to member reference to '_cury' and may cause performance degradation [altera-id-dependent-backward-branch]
/github/workspace/sdl2/../curspriv.h:177:5: note: inferred assignment of ID-dependent member from ID-dependent variable savey
/github/workspace/pdcurses/clear.c:131:9: warning: no header providing "wmove" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/clear.c:152:19: warning: no header providing "TRUE" is directly included [misc-include-cleaner]
/github/workspace/demos/tuidemo.c:14:1: warning: #includes are not sorted properly [llvm-include-order]
/github/workspace/demos/tuidemo.c:32:21: warning: 6 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/demos/tuidemo.c:37:20: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/demos/tuidemo.c:38:5: warning: no header providing "WINDOW" is directly included [misc-include-cleaner]
/github/workspace/demos/tuidemo.c:39:20: warning: 50 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/demos/tuidemo.c:41:5: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops]
/github/workspace/demos/tuidemo.c:41:21: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/demos/tuidemo.c:46:9: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops]
/github/workspace/demos/tuidemo.c:47:13: warning: no header providing "wprintw" is directly included [misc-include-cleaner]
/github/workspace/demos/tuidemo.c:50:9: warning: no header providing "wrefresh" is directly included [misc-include-cleaner]
/github/workspace/demos/tuidemo.c:53:5: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops]
/github/workspace/demos/tuidemo.c:53:21: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/demos/tuidemo.c:59:16: warning: 2 adjacent parameters of 'getfname' of similar type ('char *') are easily swapped by mistake [bugprone-easily-swappable-parameters]
/github/workspace/demos/tuidemo.c:59:22: note: the first parameter in the range is 'desc'
/github/workspace/demos/tuidemo.c:59:34: note: the last parameter in the range is 'fname'
/github/workspace/demos/tuidemo.c:78:18: warning: no header providing "FALSE" is directly included [misc-include-cleaner]
/github/workspace/demos/tuidemo.c:82:13: warning: an assignment within an 'if' condition is bug-prone [bugprone-assignment-in-if-condition]
/github/workspace/demos/tuidemo.c:82:13: note: if it should be an assignment, move it out of the 'if' condition
/github/workspace/demos/tuidemo.c:82:13: note: if it is meant to be an equality check, change '=' to '=='
/github/workspace/demos/tuidemo.c:82:28: warning: use 'fopen' mode 'e' to set O_CLOEXEC [android-cloexec-fopen]
/github/workspace/demos/tuidemo.c:88:13: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops]
/github/workspace/demos/tuidemo.c:93:29: warning: no header providing "TRUE" is directly included [misc-include-cleaner]
/github/workspace/demos/tuidemo.c:96:13: warning: switching on non-enum value without default case may not cover all cases [bugprone-switch-missing-default-case]
/github/workspace/demos/tuidemo.c:100:18: warning: 0x1b is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/demos/tuidemo.c:105:9: warning: the value returned by this function should not be disregarded; neglecting it may lead to errors [cert-err33-c]
/github/workspace/demos/tuidemo.c:105:9: note: cast the expression to void to silence this warning
/github/workspace/demos/tuidemo.c:109:9: warning: the value returned by this function should not be disregarded; neglecting it may lead to errors [cert-err33-c]
/github/workspace/demos/tuidemo.c:109:9: note: cast the expression to void to silence this warning
/github/workspace/demos/tuidemo.c:109:9: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
/github/workspace/demos/tuidemo.c:109:9: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
/github/workspace/demos/tuidemo.c:123:6: warning: variable 'MainMenu' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
/github/workspace/demos/tuidemo.c:132:6: warning: variable 'SubMenu0' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
/github/workspace/demos/tuidemo.c:138:6: warning: variable 'SubMenu1' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
/github/workspace/demos/tuidemo.c:145:6: warning: variable 'SubMenu2' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
/github/workspace/demos/tuidemo.c:153:6: warning: variable 'SubMenu3' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
/github/workspace/demos/tuidemo.c:185:5: warning: no header providing "beep" is directly included [misc-include-cleaner]
/github/workspace/demos/tuidemo.c:208:45: warning: 50 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/demos/tuidemo.c:223:5: warning: the value returned by this function should not be disregarded; neglecting it may lead to errors [cert-err33-c]
/github/workspace/demos/tuidemo.c:223:5: note: cast the expression to void to silence this warning
/github/workspace/demos/tuidemo.c:223:5: warning: function is not thread safe [concurrency-mt-unsafe]
/github/workspace/demos/firework.c:5:1: warning: replace macro with enum [cppcoreguidelines-macro-to-enum,modernize-macro-to-enum]
/github/workspace/demos/firework.c:5:9: warning: macro 'DELAYSIZE' defines an integral constant; prefer an enum instead [cppcoreguidelines-macro-to-enum,modernize-macro-to-enum]
/github/workspace/demos/firework.c:9:17: warning: all parameters should be named in a function [hicpp-named-parameter]
/github/workspace/demos/firework.c:11:7: warning: variable 'color_table' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
/github/workspace/demos/firework.c:13:41: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise]
/github/workspace/sdl2/../curses.h:1005:24: note: expanded from macro 'COLOR_CYAN'
/github/workspace/sdl2/../curses.h:1000:23: note: expanded from macro 'COLOR_BLUE'
/github/workspace/demos/firework.c:14:16: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise]
/github/workspace/sdl2/../curses.h:1006:24: note: expanded from macro 'COLOR_MAGENTA'
/github/workspace/sdl2/../curses.h:1002:23: note: expanded from macro 'COLOR_RED'
/github/workspace/demos/firework.c:14:31: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise]
/github/workspace/sdl2/../curses.h:1007:24: note: expanded from macro 'COLOR_YELLOW'
/github/workspace/sdl2/../curses.h:1002:23: note: expanded from macro 'COLOR_RED'
/github/workspace/demos/firework.c:39:5: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops]
/github/workspace/demos/firework.c:39:21: warning: 8 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/demos/firework.c:43:5: warning: random number generator seeded with a disallowed source of seed value will generate a predictable sequence of values [cert-msc32-c,cert-msc51-cpp]
/github/workspace/demos/firework.c:48:9: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops]
/github/workspace/demos/firework.c:49:21: warning: rand() has limited randomness [cert-msc30-c,cert-msc50-cpp]
/github/workspace/demos/firework.c:49:21: warning: function is not thread safe [concurrency-mt-unsafe]
/github/workspace/demos/firework.c:50:19: warning: rand() has limited randomness [cert-msc30-c,cert-msc50-cpp]
/github/workspace/demos/firework.c:50:19: warning: function is not thread safe [concurrency-mt-unsafe]
/github/workspace/demos/firework.c:56:18: warning: backward branch (do loop) is ID-dependent due to variable reference to 'diff' and may cause performance degradation [altera-id-dependent-backward-branch]
/github/workspace/demos/firework.c:22:5: note: inferred assignment of ID-dependent value from ID-dependent variable start
/github/workspace/demos/firework.c:60:9: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops]
/github/workspace/demos/firework.c:60:23: warning: backward branch (for loop) is ID-dependent due to variable reference to 'diff' and may cause performance degradation [altera-id-dependent-backward-branch]
/github/workspace/demos/firework.c:22:5: note: inferred assignment of ID-dependent value from ID-dependent variable start
/github/workspace/demos/firework.c:147:20: warning: rand() has limited randomness [cert-msc30-c,cert-msc50-cpp]
/github/workspace/demos/firework.c:147:20: warning: function is not thread safe [concurrency-mt-unsafe]
/github/workspace/demos/firework.c:147:34: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise]
/github/workspace/sdl2/../curses.h:567:22: note: expanded from macro 'A_BOLD'
/github/workspace/sdl2/../curses.h:531:26: note: expanded from macro 'WA_BOLD'
/github/workspace/sdl2/../curses.h:513:46: note: expanded from macro 'PDC_ATTRIBUTE_BIT'
/github/workspace/demos/firework.c:148:13: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise]
/github/workspace/sdl2/../curses.h:1892:45: note: expanded from macro 'COLOR_PAIR'
/github/workspace/sdl2/../curses.h:508:26: note: expanded from macro 'PDC_COLOR_SHIFT'
/github/workspace/demos/firework.c:148:24: warning: rand() has limited randomness [cert-msc30-c,cert-msc50-cpp]
/github/workspace/demos/firework.c:148:24: warning: function is not thread safe [concurrency-mt-unsafe]
/github/workspace/pdcurses/delch.c:3:1: warning: #includes are not sorted properly [llvm-include-order]
/github/workspace/pdcurses/delch.c:42:12: warning: no header providing "WINDOW" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/delch.c:45:5: warning: no header providing "chtype" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/delch.c:51:16: warning: no header providing "ERR" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/delch.c:58:5: warning: Call to function 'memmove' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memmove_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
/github/workspace/pdcurses/delch.c:58:5: note: Call to function 'memmove' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'memmove_s' in case of C11
/github/workspace/pdcurses/delch.c:68:12: warning: no header providing "OK" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/delch.c:75:19: warning: no header providing "stdscr" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/delch.c:82:9: warning: no header providing "move" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/delch.c:92:9: warning: no header providing "wmove" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/inch.c:48:1: warning: no header providing "chtype" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/inch.c:48:14: warning: no header providing "WINDOW" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/inch.c:54:24: warning: no header providing "ERR" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/inch.c:63:18: warning: no header providing "stdscr" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/inch.c:70:9: warning: no header providing "move" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/inch.c:80:9: warning: no header providing "wmove" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/inopts.c:3:1: warning: #includes are not sorted properly [llvm-include-order]
/github/workspace/pdcurses/inopts.c:170:16: warning: no header providing "ERR" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/inopts.c:172:18: warning: no header providing "TRUE" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/inopts.c:174:19: warning: no header providing "FALSE" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/inopts.c:176:12: warning: no header providing "OK" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/inopts.c:256:39: warning: 255 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/pdcurses/inopts.c:265:15: warning: no header providing "WINDOW" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/inopts.c:443:14: warning: no header providing "stdscr" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/overlay.c:3:1: warning: #includes are not sorted properly [llvm-include-order]
/github/workspace/pdcurses/overlay.c:54:12: warning: declaration uses identifier '_copy_win', which is reserved in the global namespace [bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp]
/github/workspace/pdcurses/overlay.c:54:28: warning: no header providing "WINDOW" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/overlay.c:55:22: warning: 2 adjacent parameters of '_copy_win' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters]
/github/workspace/pdcurses/overlay.c:55:26: note: the first parameter in the range is 'src_tc'
/github/workspace/pdcurses/overlay.c:55:38: note: the last parameter in the range is 'src_br'
/github/workspace/pdcurses/overlay.c:55:46: warning: 2 adjacent parameters of '_copy_win' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters]
/github/workspace/pdcurses/overlay.c:55:50: note: the first parameter in the range is 'src_bc'
/github/workspace/pdcurses/overlay.c:55:62: note: the last parameter in the range is 'dst_tr'
/github/workspace/pdcurses/overlay.c:59:5: warning: no header providing "chtype" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/overlay.c:69:16: warning: no header providing "ERR" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/overlay.c:76:20: warning: backward branch (for loop) is ID-dependent due to variable reference to 'ydiff' and may cause performance degradation [altera-id-dependent-backward-branch]
/github/workspace/pdcurses/overlay.c:63:5: note: inferred assignment of ID-dependent value from ID-dependent
/github/workspace/pdcurses/overlay.c:83:9: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops]
/github/workspace/pdcurses/overlay.c:83:23: warning: backward branch (for loop) is ID-dependent due to variable reference to 'xdiff' and may cause performance degradation [altera-id-dependent-backward-branch]
/github/workspace/pdcurses/overlay.c:62:5: note: inferred assignment of ID-dependent value from ID-dependent
/github/workspace/pdcurses/overlay.c:86:29: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise]
/github/workspace/sdl2/../curses.h:511:40: note: expanded from macro 'A_CHARTEXT'
/github/workspace/sdl2/../curses.h:484:34: note: expanded from macro 'PDC_CHARTEXT_BITS'
/github/workspace/pdcurses/overlay.c:86:29: warning: no header providing "A_CHARTEXT" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/overlay.c:103:12: warning: no header providing "OK" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/overlay.c:106:5: warning: declaration uses identifier '_copy_overlap', which is reserved in the global namespace [bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp]
/github/workspace/pdcurses/overlay.c:167:40: warning: no header providing "TRUE" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/overlay.c:174:40: warning: no header providing "FALSE" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/overlay.c:178:49: warning: 2 adjacent parameters of 'copywin' of similar type ('int') are easily swapped by mistake [bugprone-easily-swappable-parameters]
/github/workspace/pdcurses/overlay.c:178:53: note: the first parameter in the range is 'dst_bc'
/github/workspace/pdcurses/overlay.c:178:65: note: the last parameter in the range is '_overlay'
/github/workspace/pdcurses/overlay.c:188:38: warning: no header providing "curscr" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/outopts.c:3:1: warning: #includes are not sorted properly [llvm-include-order]
/github/workspace/pdcurses/outopts.c:104:13: warning: no header providing "WINDOW" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/outopts.c:110:16: warning: no header providing "ERR" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/outopts.c:114:12: warning: no header providing "OK" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/outopts.c:151:5: warning: no header providing "curs_set" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/outopts.c:160:23: warning: no header providing "stdscr" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/outopts.c:175:5: warning: do not use 'else' after 'return' [llvm-else-after-return]
/github/workspace/pdcurses/outopts.c:214:16: warning: no header providing "FALSE" is directly included [misc-include-cleaner]
/github/workspace/sdl2/pdcsdl.h:7:10: error: 'SDL.h' file not found [clang-diagnostic-error]
/github/workspace/sdl2/pdcsetsc.c:44:5: warning: no header providing "PDC_LOG" is directly included [misc-include-cleaner]
/github/workspace/sdl2/pdcsetsc.c:46:15: warning: no header providing "SP" is directly included [misc-include-cleaner]
/github/workspace/sdl2/pdcsetsc.c:50:5: warning: no header providing "PDC_gotoyx" is directly included [misc-include-cleaner]
/github/workspace/sdl2/pdcsetsc.c:65:16: warning: no header providing "ERR" is directly included [misc-include-cleaner]
/github/workspace/sdl2/pdcsetsc.c:68:9: warning: no header providing "COLORS" is directly included [misc-include-cleaner]
/github/workspace/sdl2/pdcsetsc.c:68:18: warning: 256 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/sdl2/pdcsetsc.c:68:25: warning: 256 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/sdl2/pdcsetsc.c:68:31: warning: 256 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/sdl2/pdcsetsc.c:68:37: warning: 256 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/sdl2/pdcsetsc.c:72:31: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise]
/github/workspace/sdl2/../curses.h:566:22: note: expanded from macro 'A_BLINK'
/github/workspace/sdl2/../curses.h:530:26: note: expanded from macro 'WA_BLINK'
/github/workspace/sdl2/../curses.h:513:46: note: expanded from macro 'PDC_ATTRIBUTE_BIT'
/github/workspace/sdl2/pdcsetsc.c:72:31: warning: no header providing "A_BLINK" is directly included [misc-include-cleaner]
/github/workspace/sdl2/pdcsetsc.c:73:30: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise]
/github/workspace/sdl2/../curses.h:566:22: note: expanded from macro 'A_BLINK'
/github/workspace/sdl2/../curses.h:530:26: note: expanded from macro 'WA_BLINK'
/github/workspace/sdl2/../curses.h:513:46: note: expanded from macro 'PDC_ATTRIBUTE_BIT'
/github/workspace/sdl2/pdcsetsc.c:81:12: warning: no header providing "OK" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/insstr.c:3:1: warning: #includes are not sorted properly [llvm-include-order]
/github/workspace/pdcurses/insstr.c:72:1: warning: replace macro with enum [cppcoreguidelines-macro-to-enum,modernize-macro-to-enum]
/github/workspace/pdcurses/insstr.c:72:9: warning: macro 'MAX_WSTR' defines an integral constant; prefer an enum instead [cppcoreguidelines-macro-to-enum,modernize-macro-to-enum]
/github/workspace/pdcurses/insstr.c:74:14: warning: no header providing "WINDOW" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/insstr.c:87:16: warning: no header providing "ERR" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/insstr.c:111:5: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops]
/github/workspace/pdcurses/insstr.c:111:12: warning: backward branch (while loop) is ID-dependent due to variable reference to 'n' and may cause performance degradation [altera-id-dependent-backward-branch]
/github/workspace/pdcurses/insstr.c:74:44: note: inferred assignment of ID-dependent value from ID-dependent variable len
/github/workspace/pdcurses/insstr.c:112:13: warning: no header providing "winsch" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/insstr.c:116:12: warning: no header providing "OK" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/insstr.c:123:21: warning: no header providing "stdscr" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/insstr.c:137:9: warning: no header providing "move" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/insstr.c:147:9: warning: no header providing "wmove" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/printw.c:3:1: warning: #includes are not sorted properly [llvm-include-order]
/github/workspace/pdcurses/printw.c:59:26: warning: no header providing "vsnprintf" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/printw.c:75:14: warning: no header providing "WINDOW" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/printw.c:77:19: warning: 513 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/pdcurses/printw.c:86:11: warning: Call to function 'vsnprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'vsnprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
/github/workspace/pdcurses/printw.c:59:26: note: expanded from macro 'vsnprint_func'
/github/workspace/pdcurses/printw.c:86:11: note: Call to function 'vsnprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'vsnprintf_s' in case of C11
/github/workspace/pdcurses/printw.c:59:26: note: expanded from macro 'vsnprint_func'
/github/workspace/pdcurses/printw.c:87:5: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops]
/github/workspace/pdcurses/printw.c:87:12: warning: backward branch (while loop) is ID-dependent due to variable reference to 'len' and may cause performance degradation [altera-id-dependent-backward-branch]
/github/workspace/pdcurses/printw.c:78:5: note: inferred assignment of ID-dependent value from ID-dependent variable buf
/github/workspace/pdcurses/printw.c:90:26: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise]
/github/workspace/pdcurses/printw.c:96:9: warning: Initialized va_list 'varglist_copy' is initialized again [clang-analyzer-valist.Unterminated]
/github/workspace/pdcurses/printw.c:179:12: note: Calling 'vwprintw'
/github/workspace/pdcurses/printw.c:85:5: note: Initialized va_list
/github/workspace/pdcurses/printw.c:87:12: note: Assuming 'len' is < 0
/github/workspace/pdcurses/printw.c:87:20: note: Left side of '||' is true
/github/workspace/pdcurses/printw.c:89:13: note: Assuming the condition is true
/github/workspace/pdcurses/printw.c:89:9: note: Taking true branch
/github/workspace/pdcurses/printw.c:93:13: note: 'buf' is equal to 'printbuf'
/github/workspace/pdcurses/printw.c:93:9: note: Taking false branch
/github/workspace/pdcurses/printw.c:96:9: note: Initialized va_list 'varglist_copy' is initialized again
/github/workspace/pdcurses/printw.c:97:15: warning: Call to function 'vsnprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'vsnprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
/github/workspace/pdcurses/printw.c:59:26: note: expanded from macro 'vsnprint_func'
/github/workspace/pdcurses/printw.c:97:15: note: Call to function 'vsnprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'vsnprintf_s' in case of C11
/github/workspace/pdcurses/printw.c:59:26: note: expanded from macro 'vsnprint_func'
/github/workspace/pdcurses/printw.c:99:16: warning: Initialized va_list 'varglist_copy' is leaked [clang-analyzer-valist.Unterminated]
/github/workspace/pdcurses/printw.c:179:12: note: Calling 'vwprintw'
/github/workspace/pdcurses/printw.c:85:5: note: Initialized va_list
/github/workspace/pdcurses/printw.c:87:12: note: Assuming 'len' is >= 0
/github/workspace/pdcurses/printw.c:87:12: note: Left side of '||' is false
/github/workspace/pdcurses/printw.c:87:23: note: Assuming 'len' is <= 'buffsize'
/github/workspace/pdcurses/printw.c:87:5: note: Loop condition is false. Execution jumps to the end of the function
/github/workspace/pdcurses/printw.c:99:16: note: Initialized va_list 'varglist_copy' is leaked
/github/workspace/pdcurses/printw.c:100:13: warning: no header providing "waddstr" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/printw.c:100:34: warning: no header providing "ERR" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/printw.c:120:5: warning: no header providing "va_start" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/printw.c:121:23: warning: no header providing "stdscr" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/printw.c:122:5: warning: no header providing "va_end" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/printw.c:148:9: warning: no header providing "move" is directly included [misc-include-cleaner]
/github/workspace/pdcurses/printw.c:165:9: warning: no header providing "wmove" is directly included [misc-include-cleaner]
/github/workspace/gl/pdcgl.h:7:10: error: 'SDL.h' file not found [clang-diagnostic-error]
/github/workspace/gl/pdckbd.c:5:1: warning: included header ctype.h is not used directly [misc-include-cleaner]
/github/workspace/gl/pdckbd.c:8:18: warning: variable 'event' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
/github/workspace/gl/pdckbd.c:9:20: warning: variable 'oldkey' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
/github/workspace/gl/pdckbd.c:10:8: warning: no header providing "MOUSE_STATUS" is directly included [misc-include-cleaner]
/github/workspace/gl/pdckbd.c:10:21: warning: variable 'old_mouse_status' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
/github/workspace/gl/pdckbd.c:23:17: warning: no header providing "FALSE" is directly included [misc-include-cleaner]
/github/workspace/gl/pdckbd.c:23:25: warning: no header providing "KEY_LEFT" is directly included [misc-include-cleaner]
/github/workspace/gl/pdckbd.c:23:38: warning: no header providing "KEY_SLEFT" is directly included [misc-include-cleaner]
/github/workspace/gl/pdckbd.c:23:52: warning: no header providing "CTL_LEFT" is directly included [misc-include-cleaner]
/github/workspace/gl/pdckbd.c:87:5: warning: no header providing "INTENTIONALLY_UNUSED_PARAMETER" is directly included [misc-include-cleaner]
/github/workspace/gl/pdckbd.c:88:5: warning: no header providing "PDC_LOG" is directly included [misc-include-cleaner]
/github/workspace/gl/pdckbd.c:93:12: warning: declaration uses identifier '_stored_key', which is reserved in the global namespace [bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp]
/github/workspace/gl/pdckbd.c:93:12: warning: variable '_stored_key' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
/github/workspace/gl/pdckbd.c:94:15: warning: declaration uses identifier '_stored_timestamp', which is reserved in the global namespace [bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp]
/github/workspace/gl/pdckbd.c:94:15: warning: variable '_stored_timestamp' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
/github/workspace/gl/pdckbd.c:155:12: warning: declaration uses identifier '_handle_alt_keys', which is reserved in the global namespace [bugprone-reserved-identifier,cert-dcl37-c,cert-dcl51-cpp]
/github/workspace/gl/pdckbd.c:157:15: warning: 0x7f is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/gl/pdckbd.c:160:9: warning: no header providing "SP" is directly included [misc-include-cleaner]
/github/workspace/gl/pdckbd.c:160:29: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise]
/github/workspace/gl/../curses.h:1927:34: note: expanded from macro 'PDC_KEY_MODIFIER_CONTROL'
/github/workspace/gl/pdckbd.c:160:29: warning: no header providing "PDC_KEY_MODIFIER_CONTROL" is directly included [misc-include-cleaner]
/github/workspace/sdl2/../curses.h:344:56: note: expanded from macro 'REPORT_MOUSE_POSITION'
/github/workspace/demos/newtest.c:256:55: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise]
/github/workspace/sdl2/../curses.h:344:56: note: expanded from macro 'REPORT_MOUSE_POSITION'
/github/workspace/demos/newtest.c:257:14: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise]
/github/workspace/sdl2/../curses.h:1892:45: note: expanded from macro 'COLOR_PAIR'
/github/workspace/sdl2/../curses.h:508:26: note: expanded from macro 'PDC_COLOR_SHIFT'
/github/workspace/demos/newtest.c:260:19: warning: 80 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/demos/newtest.c:289:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise]
/github/workspace/sdl2/../curses.h:570:22: note: expanded from macro 'A_REVERSE'
/github/workspace/sdl2/../curses.h:529:26: note: expanded from macro 'WA_REVERSE'
/github/workspace/sdl2/../curses.h:513:46: note: expanded from macro 'PDC_ATTRIBUTE_BIT'
/github/workspace/demos/newtest.c:290:23: warning: 14 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/demos/newtest.c:290:27: warning: 41 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/demos/newtest.c:291:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise]
/github/workspace/sdl2/../curses.h:568:22: note: expanded from macro 'A_DIM'
/github/workspace/sdl2/../curses.h:536:28: note: expanded from macro 'WA_DIM'
/github/workspace/sdl2/../curses.h:513:46: note: expanded from macro 'PDC_ATTRIBUTE_BIT'
/github/workspace/demos/newtest.c:292:23: warning: 15 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/demos/newtest.c:292:27: warning: 41 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/demos/newtest.c:293:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise]
/github/workspace/sdl2/../curses.h:572:22: note: expanded from macro 'A_STANDOUT'
/github/workspace/sdl2/../curses.h:549:28: note: expanded from macro 'WA_STANDOUT'
/github/workspace/sdl2/../curses.h:513:46: note: expanded from macro 'PDC_ATTRIBUTE_BIT'
/github/workspace/demos/newtest.c:294:23: warning: 16 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/demos/newtest.c:294:27: warning: 41 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/demos/newtest.c:295:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise]
/github/workspace/sdl2/../curses.h:572:22: note: expanded from macro 'A_STANDOUT'
/github/workspace/sdl2/../curses.h:549:28: note: expanded from macro 'WA_STANDOUT'
/github/workspace/sdl2/../curses.h:513:46: note: expanded from macro 'PDC_ATTRIBUTE_BIT'
/github/workspace/demos/newtest.c:299:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise]
/github/workspace/sdl2/../curses.h:566:22: note: expanded from macro 'A_BLINK'
/github/workspace/sdl2/../curses.h:530:26: note: expanded from macro 'WA_BLINK'
/github/workspace/sdl2/../curses.h:513:46: note: expanded from macro 'PDC_ATTRIBUTE_BIT'
/github/workspace/demos/newtest.c:300:13: warning: the value returned by this function should not be disregarded; neglecting it may lead to errors [cert-err33-c]
/github/workspace/demos/newtest.c:300:13: note: cast the expression to void to silence this warning
/github/workspace/demos/newtest.c:300:13: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
/github/workspace/demos/newtest.c:300:13: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
/github/workspace/demos/newtest.c:300:69: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise]
/github/workspace/sdl2/../curses.h:530:26: note: expanded from macro 'WA_BLINK'
/github/workspace/sdl2/../curses.h:513:46: note: expanded from macro 'PDC_ATTRIBUTE_BIT'
/github/workspace/demos/newtest.c:302:23: warning: 6 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/demos/newtest.c:302:26: warning: 40 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/demos/newtest.c:304:23: warning: 8 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/demos/newtest.c:304:26: warning: 40 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/demos/newtest.c:306:13: warning: the value returned by this function should not be disregarded; neglecting it may lead to errors [cert-err33-c]
/github/workspace/demos/newtest.c:306:13: note: cast the expression to void to silence this warning
/github/workspace/demos/newtest.c:306:13: warning: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
/github/workspace/demos/newtest.c:306:13: note: Call to function 'sprintf' is insecure as it does not provide bounding of the memory buffer or security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
/github/workspace/demos/newtest.c:307:23: warning: 7 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/demos/newtest.c:307:26: warning: 40 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/demos/newtest.c:310:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise]
/github/workspace/sdl2/../curses.h:588:22: note: expanded from macro 'A_ITALIC'
/github/workspace/sdl2/../curses.h:527:26: note: expanded from macro 'WA_ITALIC'
/github/workspace/sdl2/../curses.h:513:46: note: expanded from macro 'PDC_ATTRIBUTE_BIT'
/github/workspace/demos/newtest.c:313:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise]
/github/workspace/sdl2/../curses.h:1892:45: note: expanded from macro 'COLOR_PAIR'
/github/workspace/sdl2/../curses.h:508:26: note: expanded from macro 'PDC_COLOR_SHIFT'
/github/workspace/demos/newtest.c:314:21: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise]
/github/workspace/sdl2/../curses.h:573:22: note: expanded from macro 'A_UNDERLINE'
/github/workspace/sdl2/../curses.h:528:26: note: expanded from macro 'WA_UNDERLINE'
/github/workspace/sdl2/../curses.h:513:46: note: expanded from macro 'PDC_ATTRIBUTE_BIT'
/github/workspace/demos/newtest.c:320:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise]
/github/workspace/sdl2/../curses.h:1892:45: note: expanded from macro 'COLOR_PAIR'
/github/workspace/sdl2/../curses.h:508:26: note: expanded from macro 'PDC_COLOR_SHIFT'
/github/workspace/demos/newtest.c:332:22: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise]
/github/workspace/sdl2/../curses.h:535:28: note: expanded from macro 'WA_STRIKEOUT'
/github/workspace/sdl2/../curses.h:513:46: note: expanded from macro 'PDC_ATTRIBUTE_BIT'
/github/workspace/demos/newtest.c:333:23: warning: 10 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/demos/newtest.c:333:27: warning: 40 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/demos/newtest.c:350:23: warning: 5 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/demos/newtest.c:351:13: warning: kernel performance could be improved by unrolling this loop with a '#pragma unroll' directive [altera-unroll-loops]
/github/workspace/demos/newtest.c:351:29: warning: 8 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/demos/newtest.c:357:17: warning: the value returned by this function should not be disregarded; neglecting it may lead to errors [cert-err33-c]
/github/workspace/demos/newtest.c:357:17: note: cast the expression to void to silence this warning
/github/workspace/demos/newtest.c:357:17: warning: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11 [clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
/github/workspace/demos/newtest.c:357:17: note: Call to function 'sprintf' is insecure as it does not provide security checks introduced in the C11 standard. Replace with analogous functions that support length arguments or provides boundary checks such as 'sprintf_s' in case of C11
/github/workspace/demos/newtest.c:357:56: warning: 16 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/demos/newtest.c:357:61: warning: 128 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/demos/newtest.c:357:68: warning: 0xff is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
/github/workspace/demos/newtest.c:357:68: warning: use of a signed integer operand with a binary bitwise operator [hicpp-signed-bitwise]
/github/workspace/demos/newtest.c:360:27: warning: 6 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers]
If there are some that should be tackled "later", then it is possibly good to create an issue for that.
@Bill-Gray Not sure if there are any you want to tackle "sooner".
While testing to enable a CI for clang-tidy and cppcheck, I was presented with the following warnings:
are there any that we explicit don't care about (maybe "The scope of the variable 'x' can be reduced.")?
If there are some that should be tackled "later", then it is possibly good to create an issue for that.
@Bill-Gray Not sure if there are any you want to tackle "sooner".