# cppcheck baseline -- maintained by staticGate.sh (see its header)
# format: <count> <normalized key>, each preceded by its justification:
#   # FP: <reason>          triaged false positive
#   # THIRDPARTY: <reason>  upstream code, not modified by DVX
#   # UNTRIAGED ...         accepted by --update, not reviewed yet
# staticGate.sh --update keeps these comments with their keys, drops
# keys whose count is now 0, and marks new or grown keys UNTRIAGED.
# Entries with no comment predate this convention (not yet triaged).

# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/apps/kpunch/cpanel/cpSounds.c|constParameterCallback|Parameter 'w' can be declared as pointer to const. However it seems that 'onBankTest' is a callback function, if 'w' is declared with const you might also need to cast function pointer(s).
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/apps/kpunch/cpanel/cpTypes.c|constParameterCallback|Parameter 'dlg' can be declared as pointer to const. However it seems that 'typeDlgOk' is a callback function, if 'dlg' is declared with const you might also need to cast function pointer(s).
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/cpanel/cpTypes.c|unsignedLessThanZero|Checking if unsigned expression '(sCells)?((struct stbds_array_header*)(sCells)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/cpanel/cpanel.c|unsignedLessThanZero|Checking if unsigned expression '(*entries)?((struct stbds_array_header*)(*entries)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/cpanel/cpanel.c|unsignedLessThanZero|Checking if unsigned expression '(*labels)?((struct stbds_array_header*)(*labels)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/cpanel/cpanel.c|unsignedLessThanZero|Checking if unsigned expression '(sVideoLabels)?((struct stbds_array_header*)(sVideoLabels)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/dvxbasic/basdev/basDevBas.c|unsignedLessThanZero|Checking if unsigned expression '(sCompError)?((struct stbds_array_header*)(sCompError)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/dvxbasic/basdev/basDevBas.c|unsignedLessThanZero|Checking if unsigned expression 'r->breakpoints?((struct stbds_array_header*)(r->breakpoints)-1)->capacity:0' is less than zero.
# FP: style suggestion only (variable scope), no defect.
1 src/apps/kpunch/dvxbasic/compiler/compact.c|variableScope|The scope of the variable 'lineCount' can be reduced.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/dvxbasic/compiler/compiler.c|unsignedLessThanZero|Checking if unsigned expression 'c->symChanges?((struct stbds_array_header*)(c->symChanges)-1)->capacity:0' is less than zero.
# FP: deliberate rounding of a constant to SINGLE precision (BASIC SINGLE semantics).
1 src/apps/kpunch/dvxbasic/compiler/fold.c|suspiciousFloatingPointCast|Floating-point cast causes loss of precision.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/dvxbasic/compiler/gen.c|unsignedLessThanZero|Checking if unsigned expression 'c->procTempSlots?((struct stbds_array_header*)(c->procTempSlots)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/dvxbasic/compiler/gen.c|unsignedLessThanZero|Checking if unsigned expression 'c->tempSlots?((struct stbds_array_header*)(c->tempSlots)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/dvxbasic/compiler/genStmt.c|unsignedLessThanZero|Checking if unsigned expression '(failJumps)?((struct stbds_array_header*)(failJumps)-1)->capacity:0' is less than zero.
# FP: redundant but harmless: a leading digit was already taken by the number branch above; the extra test documents that identifiers cannot start with a digit.
1 src/apps/kpunch/dvxbasic/compiler/lexer.c|knownConditionTrueFalse|Condition '!isdigit((unsigned char)c)' is always true
# FP: cppcheck loses valueEnd (set from lineEnd); a quoted value is two or more characters on real lines (covered by test_compiler obfuscation cases).
1 src/apps/kpunch/dvxbasic/compiler/obfuscate.c|knownConditionTrueFalse|Condition 'valueEnd-valueStart>=2' is always false
# FP: follows from the same lost valueEnd as the >=2 finding; an empty value is possible and must not count as a name.
1 src/apps/kpunch/dvxbasic/compiler/obfuscate.c|knownConditionTrueFalse|Condition 'valueLen>0' is always false
# FP: style suggestion only (variable scope), no defect.
1 src/apps/kpunch/dvxbasic/compiler/strip.c|variableScope|The scope of the variable 'nConst' can be reduced.
# FP: style suggestion only (variable scope), no defect.
1 src/apps/kpunch/dvxbasic/compiler/strip.c|variableScope|The scope of the variable 'nKept' can be reduced.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/dvxbasic/formrt/basRunHost.c|unsignedLessThanZero|Checking if unsigned expression '(*saved)?((struct stbds_array_header*)(*saved)-1)->capacity:0' is less than zero.
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/apps/kpunch/dvxbasic/formrt/formDesign.c|constParameterCallback|Parameter 'win' can be declared as pointer to const. However it seems that 'dsgnOnCursor' is a callback function, if 'win' is declared with const you might also need to cast function pointer(s).
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/apps/kpunch/dvxbasic/formrt/formDesign.c|constParameterCallback|Parameter 'win' can be declared as pointer to const. However it seems that 'dsgnOnKey' is a callback function, if 'win' is declared with const you might also need to cast function pointer(s).
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/apps/kpunch/dvxbasic/formrt/formDesign.c|constParameterCallback|Parameter 'win' can be declared as pointer to const. However it seems that 'dsgnOnMouse' is a callback function, if 'win' is declared with const you might also need to cast function pointer(s).
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/dvxbasic/formrt/formDesign.c|unsignedLessThanZero|Checking if unsigned expression '(sText)?((struct stbds_array_header*)(sText)-1)->capacity:0' is less than zero.
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/apps/kpunch/dvxbasic/formrt/formPrinter.c|constParameterCallback|Parameter 'ctx' can be declared as pointer to const. However it seems that 'prBandSpan' is a callback function, if 'ctx' is declared with const you might also need to cast function pointer(s).
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/apps/kpunch/dvxbasic/formrt/formPrinter.c|constParameterCallback|Parameter 'ctx' can be declared as pointer to const. However it seems that 'prVecDot' is a callback function, if 'ctx' is declared with const you might also need to cast function pointer(s).
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/apps/kpunch/dvxbasic/formrt/formPrinter.c|constParameterCallback|Parameter 'ctx' can be declared as pointer to const. However it seems that 'prVecEllipse' is a callback function, if 'ctx' is declared with const you might also need to cast function pointer(s).
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/apps/kpunch/dvxbasic/formrt/formPrinter.c|constParameterCallback|Parameter 'ctx' can be declared as pointer to const. However it seems that 'prVecEllipseFill' is a callback function, if 'ctx' is declared with const you might also need to cast function pointer(s).
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/apps/kpunch/dvxbasic/formrt/formPrinter.c|constParameterCallback|Parameter 'ctx' can be declared as pointer to const. However it seems that 'prVecLine' is a callback function, if 'ctx' is declared with const you might also need to cast function pointer(s).
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/apps/kpunch/dvxbasic/formrt/formPrinter.c|constParameterCallback|Parameter 'ctx' can be declared as pointer to const. However it seems that 'prVecRect' is a callback function, if 'ctx' is declared with const you might also need to cast function pointer(s).
# FP: prShapeDo draws on the measuring surface, whose span callback (prMeasureSpan) moves p->touchBottom; cppcheck does not follow the callback.
1 src/apps/kpunch/dvxbasic/formrt/formPrinter.c|knownConditionTrueFalse|Condition 'p->touchBottom<0' is always true
# FP: upperCopy bounds the destination; src[i] is read inside the NUL-terminated source string, so the order is safe.
1 src/apps/kpunch/dvxbasic/formrt/formrt.c|arrayIndexThenCheck|Array index 'i' is used before limits check.
# FP: signature fixed by the BasDeviceCallbacksT frameBusy pointer type (void *ctx shared with callbacks that write through it).
1 src/apps/kpunch/dvxbasic/formrt/formrt.c|constParameterCallback|Parameter 'ctx' can be declared as pointer to const. However it seems that 'deviceFrameBusy' is a callback function, if 'ctx' is declared with const you might also need to cast function pointer(s).
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/apps/kpunch/dvxbasic/formrt/formrt.c|constParameterCallback|Parameter 'ctx' can be declared as pointer to const. However it seems that 'deviceShellResult' is a callback function, if 'ctx' is declared with const you might also need to cast function pointer(s).
# FP: formFullChanged is an ExclusiveFnT; the callback type fixes the parameter
1 src/apps/kpunch/dvxbasic/formrt/formrt.c|constParameterCallback|Parameter 'win' can be declared as pointer to const. However it seems that 'formFullChanged' is a callback function, if 'win' is declared with const you might also need to cast function pointer(s).
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/apps/kpunch/dvxbasic/formrt/formrt.c|constParameterCallback|Parameter 'win' can be declared as pointer to const. However it seems that 'onFormClose' is a callback function, if 'win' is declared with const you might also need to cast function pointer(s).
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/apps/kpunch/dvxbasic/formrt/formrt.c|constParameterCallback|Parameter 'win' can be declared as pointer to const. However it seems that 'onFormMenu' is a callback function, if 'win' is declared with const you might also need to cast function pointer(s).
# FP: redundant (menuId >= DSGN_MENU_ID_BASE already implies idx >= 0) but keeps the array bound check self-contained.
1 src/apps/kpunch/dvxbasic/ide/ideMain.c|knownConditionTrueFalse|Condition 'idx>=0' is always true
# FP: general is checked through ok (ok = general != NULL) and the function returns before the write when it is NULL.
1 src/apps/kpunch/dvxbasic/ide/ideMain.c|nullPointerOutOfMemory|If memory allocation fails, then there is a possible null pointer dereference: general
# FP: style only (test or setup code assigns a value twice for clarity), no defect.
1 src/apps/kpunch/dvxbasic/ide/ideMain.c|redundantAssignment|Variable 'count' is assigned an expression that holds the same value.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/dvxbasic/ide/ideMain.c|unsignedLessThanZero|Checking if unsigned expression '(sBreakTitles)?((struct stbds_array_header*)(sBreakTitles)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/dvxbasic/ide/ideMain.c|unsignedLessThanZero|Checking if unsigned expression '(sBreakpoints)?((struct stbds_array_header*)(sBreakpoints)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/dvxbasic/ide/ideMain.c|unsignedLessThanZero|Checking if unsigned expression '(sEvtItems)?((struct stbds_array_header*)(sEvtItems)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/dvxbasic/ide/ideMain.c|unsignedLessThanZero|Checking if unsigned expression '(sObjItems)?((struct stbds_array_header*)(sObjItems)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/dvxbasic/ide/ideMain.c|unsignedLessThanZero|Checking if unsigned expression '(sProcTable)?((struct stbds_array_header*)(sProcTable)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/dvxbasic/ide/ideMain.c|unsignedLessThanZero|Checking if unsigned expression '(sRecentFiles)?((struct stbds_array_header*)(sRecentFiles)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/dvxbasic/ide/ideMain.c|unsignedLessThanZero|Checking if unsigned expression '(sWithEvents)?((struct stbds_array_header*)(sWithEvents)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/dvxbasic/ide/ideMain.c|unsignedLessThanZero|Checking if unsigned expression 'rows->cells?((struct stbds_array_header*)(rows->cells)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/dvxbasic/ide/ideMain.c|unsignedLessThanZero|Checking if unsigned expression 'rows->strs?((struct stbds_array_header*)(rows->strs)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/dvxbasic/ide/ideMenuEditor.c|unsignedLessThanZero|Checking if unsigned expression '(sLabelBufs)?((struct stbds_array_header*)(sLabelBufs)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/dvxbasic/ide/ideMenuEditor.c|unsignedLessThanZero|Checking if unsigned expression '(sLabels)?((struct stbds_array_header*)(sLabels)-1)->capacity:0' is less than zero.
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/apps/kpunch/dvxbasic/ide/ideProject.c|constParameterCallback|Parameter 'w' can be declared as pointer to const. However it seems that 'onTreeItemDblClick' is a callback function, if 'w' is declared with const you might also need to cast function pointer(s).
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/dvxbasic/ide/ideProperties.c|unsignedLessThanZero|Checking if unsigned expression '(sCellData)?((struct stbds_array_header*)(sCellData)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/dvxbasic/ide/ideProperties.c|unsignedLessThanZero|Checking if unsigned expression '(sTreeLabels)?((struct stbds_array_header*)(sTreeLabels)-1)->capacity:0' is less than zero.
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/apps/kpunch/dvxbasic/ide/ideToolbox.c|constParameterCallback|Parameter 'w' can be declared as pointer to const. However it seems that 'onToolClick' is a callback function, if 'w' is declared with const you might also need to cast function pointer(s).
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/dvxbasic/ide/ideToolbox.c|unsignedLessThanZero|Checking if unsigned expression '(sTbxTools)?((struct stbds_array_header*)(sTbxTools)-1)->capacity:0' is less than zero.
# FP: floodFill starts the span's left and right edges at the seed column on purpose; the two scans that follow then widen each one independently.
1 src/apps/kpunch/dvxbasic/runtime/gfx.c|duplicateAssignExpression|Same expression used in consecutive assignments of 'left' and 'right'.
# FP: nul is the storage for the empty string's terminator (struct hack); it is read through the BasStringT data, never by name.
1 src/apps/kpunch/dvxbasic/runtime/values.c|unusedStructMember|struct member 'Anonymous1::nul' is never used.
# FP: style suggestion only (variable scope), no defect.
1 src/apps/kpunch/dvxbasic/runtime/values.c|variableScope|The scope of the variable 'copyB' can be reduced.
# FP: style suggestion only (could be const), no defect.
1 src/apps/kpunch/dvxbasic/runtime/vm.c|constVariable|Variable 'mark' can be declared as const array
# FP: cppcheck loses the loop bound; after < codeLen is false only for an instruction ending the code, which the check exists for.
1 src/apps/kpunch/dvxbasic/runtime/vm.c|knownConditionTrueFalse|Condition 'after<codeLen' is always false
# FP: test code; an allocation failure there aborts the test run, which is the wanted outcome.
1 src/apps/kpunch/dvxbasic/test_compact.c|nullPointerOutOfMemory|If memory allocation fails, then there is a possible null pointer dereference: mod
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/apps/kpunch/dvxbasic/test_compiler.c|constParameterCallback|Parameter 'args' can be declared as pointer to const. However it seems that 'stubCallExtern' is a callback function, if 'args' is declared with const you might also need to cast function pointer(s).
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/apps/kpunch/dvxbasic/test_suite.c|constParameterCallback|Parameter 'args' can be declared as pointer to const. However it seems that 'externCallStub' is a callback function, if 'args' is declared with const you might also need to cast function pointer(s).
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/apps/kpunch/dvxbasic/test_suite.c|constParameterCallback|Parameter 'parentRef' can be declared as pointer to const. However it seems that 'uiStubCreateCtrlEx' is a callback function, if 'parentRef' is declared with const you might also need to cast function pointer(s).
# FP: style suggestion only (could be const), no defect.
1 src/apps/kpunch/dvxbasic/test_suite.c|constVariable|Variable 'frmLens' can be declared as const array
# FP: test code; an allocation failure there aborts the test run, which is the wanted outcome.
1 src/apps/kpunch/dvxbasic/test_suite.c|nullPointerOutOfMemory|If memory allocation fails, then there is a possible null pointer dereference: text
# FP: test code; a failed fopen there fails the test, which is the wanted outcome.
1 src/apps/kpunch/dvxbasic/test_suite.c|nullPointerOutOfResources|If resource allocation fails, then there is a possible null pointer dereference: f
# FP: style only (test or setup code assigns a value twice for clarity), no defect.
1 src/apps/kpunch/dvxbasic/test_suite.c|redundantAssignment|Variable 'proc.localCount' is reassigned a value before the old one has been used.
# FP: style suggestion only (variable scope), no defect.
1 src/apps/kpunch/dvxbasic/test_suite.c|variableScope|The scope of the variable 'detail' can be reduced.
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
# FP: style suggestion only (variable scope), no defect.
# FP: style suggestion only (variable scope), no defect.
# FP: style suggestion only (variable scope), no defect.
# FP: style suggestion only (variable scope), no defect.
1 src/apps/kpunch/progman/pmProps.c|variableScope|The scope of the variable 'msg' can be reduced.
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/apps/kpunch/progman/progman.c|constParameterCallback|Parameter 'userCtx' can be declared as pointer to const. However it seems that 'onHotkey' is a callback function, if 'userCtx' is declared with const you might also need to cast function pointer(s).
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/apps/kpunch/progman/progman.c|constParameterCallback|Parameter 'w' can be declared as pointer to const. However it seems that 'onSearchChange' is a callback function, if 'w' is declared with const you might also need to cast function pointer(s).
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/progman/progman.c|unsignedLessThanZero|Checking if unsigned expression '(sEntries)?((struct stbds_array_header*)(sEntries)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/progman/progman.c|unsignedLessThanZero|Checking if unsigned expression '(sGroupNames)?((struct stbds_array_header*)(sGroupNames)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/apps/kpunch/progman/progman.c|unsignedLessThanZero|Checking if unsigned expression '(sHotkeys)?((struct stbds_array_header*)(sHotkeys)-1)->capacity:0' is less than zero.
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/installer/setup.c|constParameterCallback|Parameter 'w' can be declared as pointer to const. However it seems that 'boardPaint' is a callback function, if 'w' is declared with const you might also need to cast function pointer(s).
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/libs/kpunch/audio/audioLoad.c|constParameterCallback|Parameter 'ctx' can be declared as pointer to const. However it seems that 'vocMemRead' is a callback function, if 'ctx' is declared with const you might also need to cast function pointer(s).
# FP: signature fixed by the widget onClick callback type (WidgetT *).
# FP: public audio.h API taking the program's AudioCtxT handle (non-const by convention); cppcheck calls it a callback only because its address is in the audioSynthLock pin table.
1 src/libs/kpunch/audio/audioSynth.c|constParameterCallback|Parameter 'ctx' can be declared as pointer to const. However it seems that 'audioFmFree' is a callback function, if 'ctx' is declared with const you might also need to cast function pointer(s).
# FP: public audio.h API taking the program's AudioCtxT handle (non-const by convention); cppcheck calls it a callback only because its address is in the audioSynthLock pin table.
1 src/libs/kpunch/audio/audioSynth.c|constParameterCallback|Parameter 'ctx' can be declared as pointer to const. However it seems that 'audioFmRawWrite' is a callback function, if 'ctx' is declared with const you might also need to cast function pointer(s).
# FP: public audio.h API taking the program's AudioCtxT handle (non-const by convention); cppcheck calls it a callback only because its address is in the audioSynthLock pin table.
1 src/libs/kpunch/audio/audioSynth.c|constParameterCallback|Parameter 'ctx' can be declared as pointer to const. However it seems that 'audioFmWrite' is a callback function, if 'ctx' is declared with const you might also need to cast function pointer(s).
# FP: public audio.h API taking the program's AudioCtxT handle (non-const by convention); cppcheck calls it a callback only because its address is in the audioSynthLock pin table.
1 src/libs/kpunch/audio/audioSynth.c|constParameterCallback|Parameter 'ctx' can be declared as pointer to const. However it seems that 'audioMidiPut' is a callback function, if 'ctx' is declared with const you might also need to cast function pointer(s).
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/libs/kpunch/conn/conn.c|constParameterCallback|Parameter 'c' can be declared as pointer to const. However it seems that 'serialSend' is a callback function, if 'c' is declared with const you might also need to cast function pointer(s).
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/libs/kpunch/dvxnet/netProto.c|constParameterCallback|Parameter 'arg' can be declared as pointer to const. However it seems that 'dnsFound' is a callback function, if 'arg' is declared with const you might also need to cast function pointer(s).
# FP: the block (b.info) is linked into the returned addrinfo list and freed by freeaddrinfo.
1 src/libs/kpunch/dvxnet/netResolve.c|memleak|Memory leak: b.info
# FP: another task can close the socket during the yield, so s->proto can change.
1 src/libs/kpunch/dvxnet/netSock.c|knownConditionTrueFalse|Condition 's->proto!=proto' is always false
# FP: FarStackT::esp is used by the real-mode callback stub's lss.
1 src/libs/kpunch/dvxnet/pktDrvDos.c|unusedStructMember|struct member 'FarStackT::esp' is never used.
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/libs/kpunch/dvxshell/shellApp.c|constParameterCallback|Parameter 'arg' can be declared as pointer to const. However it seems that 'appTaskWrapper' is a callback function, if 'arg' is declared with const you might also need to cast function pointer(s).
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/libs/kpunch/dvxshell/shellApp.c|constParameterCallback|Parameter 'arg' can be declared as pointer to const. However it seems that 'appWorkTaskWrapper' is a callback function, if 'arg' is declared with const you might also need to cast function pointer(s).
# FP: style suggestion only (variable scope), no defect.
1 src/libs/kpunch/dvxshell/shellAssoc.c|variableScope|The scope of the variable 'tokenLen' can be reduced.
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/libs/kpunch/dvxshell/shellBas.c|constParameterCallback|Parameter 'userCtx' can be declared as pointer to const. However it seems that 'hotkeyPressed' is a callback function, if 'userCtx' is declared with const you might also need to cast function pointer(s).
# FP: bootNotesShow returns when the notes are empty, so the loop has written msg[0 .. len - 1] before the snprintf at msg + len - 1.
1 src/libs/kpunch/dvxshell/shellMain.c|uninitvar|Uninitialized variable: msg
# FP: style suggestion only (variable scope), no defect.
1 src/libs/kpunch/dvxshell/shellRun.c|variableScope|The scope of the variable 'resolved' can be reduced.
# FP: the strdup'd name moves into scan->entries by arrput; stb_ds OOM hook never returns, so it cannot be dropped.
1 src/libs/kpunch/fileops/fileOps.c|memleak|Memory leak: entry.name
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/libs/kpunch/hlpfile/hlpFileBas.c|unsignedLessThanZero|Checking if unsigned expression 'hd->found?((struct stbds_array_header*)(hd->found)-1)->capacity:0' is less than zero.
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/libs/kpunch/libdvx/dvxApp.c|constParameterCallback|Parameter 'user' can be declared as pointer to const. However it seems that 'imageSrcEof' is a callback function, if 'user' is declared with const you might also need to cast function pointer(s).
# FP: style suggestion only (could be const), no defect.
1 src/libs/kpunch/libdvx/dvxApp.c|constVariable|Variable 'keyRec' can be declared as const array
# FP: style suggestion only (could be const), no defect.
1 src/libs/kpunch/libdvx/dvxApp.c|constVariable|Variable 'mouseRec' can be declared as const array
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/libs/kpunch/libdvx/dvxBas.c|unsignedLessThanZero|Checking if unsigned expression 't->buf?((struct stbds_array_header*)(t->buf)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/libs/kpunch/libdvx/dvxFlow.c|unsignedLessThanZero|Checking if unsigned expression 'flow->items?((struct stbds_array_header*)(flow->items)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/libs/kpunch/libdvx/dvxFlow.c|unsignedLessThanZero|Checking if unsigned expression 'flow->lines?((struct stbds_array_header*)(flow->lines)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/libs/kpunch/libdvx/dvxFlow.c|unsignedLessThanZero|Checking if unsigned expression 'flow->segs?((struct stbds_array_header*)(flow->segs)-1)->capacity:0' is less than zero.
# FP: dfnTextToUnicode's index is a uint8_t (0..255); cppcheck forgets the type past ch<0x80
1 src/libs/kpunch/libdvx/dvxFontFmt.c|arrayIndexOutOfBoundsCond|Either the condition 'ch<0x80' is redundant or the array 'dfnCp437[256]' is accessed at index 256, which is out of bounds.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/libs/kpunch/libdvx/dvxText.c|unsignedLessThanZero|Checking if unsigned expression '(sView)?((struct stbds_array_header*)(sView)-1)->capacity:0' is less than zero.
# FP: the gate defines DXE_EXPORT as empty, which leaves DXE_EXPORT(strerror) as a bare (strerror) cppcheck cannot parse; the real macro builds the export table entry.
1 src/libs/kpunch/libdvx/platform/dvxPlatformDos.c|unknownMacro|There is an unknown macro here somewhere. Configuration is required. If strerror is a macro then please configure it.
# FP: raise() returns when no handler longjmps out (DOS without a recovery point); the abort() after it is the intended fallback.
1 src/libs/kpunch/libdvx/platform/dvxPlatformUtil.c|unreachableCode|Statements following noreturn function 'raise()' will never be executed.
# FP: re-entrancy guard: a user callback run just before can destroy widgets and bump sWidgetGen; cppcheck cannot see callbacks change the global.
1 src/libs/kpunch/libdvx/widgetOps.c|knownConditionTrueFalse|Condition 'sWidgetGen!=gen' is always false
# FP: saved and restored by the context-switch assembly (or kept for the ASan fake-stack layout), never by name in C.
1 src/libs/kpunch/libtasks/taskswitch.c|unusedStructMember|struct member 'TaskBlockT::asanFake' is never used.
# FP: saved and restored by the context-switch assembly (or kept for the ASan fake-stack layout), never by name in C.
1 src/libs/kpunch/libtasks/taskswitch.c|unusedStructMember|struct member 'TaskContextT::ebp' is never used.
# FP: saved and restored by the context-switch assembly (or kept for the ASan fake-stack layout), never by name in C.
1 src/libs/kpunch/libtasks/taskswitch.c|unusedStructMember|struct member 'TaskContextT::ebx' is never used.
# FP: saved and restored by the context-switch assembly (or kept for the ASan fake-stack layout), never by name in C.
1 src/libs/kpunch/libtasks/taskswitch.c|unusedStructMember|struct member 'TaskContextT::edi' is never used.
# FP: saved and restored by the context-switch assembly (or kept for the ASan fake-stack layout), never by name in C.
1 src/libs/kpunch/libtasks/taskswitch.c|unusedStructMember|struct member 'TaskContextT::esi' is never used.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/libs/kpunch/listhelp/listHelp.c|unsignedLessThanZero|Checking if unsigned expression '(owned)?((struct stbds_array_header*)(owned)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrdel macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/libs/kpunch/music/musicMmlPlay.c|unsignedLessThanZero|Checking if unsigned expression 'mml->parts?((struct stbds_array_header*)(mml->parts)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/libs/kpunch/pkg/pkgBas.c|unsignedLessThanZero|Checking if unsigned expression 'ss->zipEntries?((struct stbds_array_header*)(ss->zipEntries)-1)->capacity:0' is less than zero.
# FP: parseOpts gets main's argv (char *const there); C does not convert char ** to const char *const * without a cast.
1 src/libs/kpunch/pkg/pkgCli.c|constParameter|Parameter 'argv' can be declared as const array
# FP: strtol's long is 64 bits on 64-bit hosts (the host tools and tests), where n > INT32_MAX is a real check; cppcheck runs as unix32.
1 src/libs/kpunch/pkg/pkgManifest.c|compareValueOutOfTypeRangeError|Comparing expression of type 'signed long' against value 2147483647. Condition is always false.
# FP: strtoul's unsigned long is 64 bits on 64-bit hosts (the host tools and tests), where n > UINT32_MAX is a real check; cppcheck runs as unix32.
1 src/libs/kpunch/pkg/pkgManifest.c|compareValueOutOfTypeRangeError|Comparing expression of type 'unsigned long' against value 4294967295. Condition is always false.
# FP: the strdup'd name moves into m->files by arrput (freed by pkgManifestFree); the stb_ds OOM hook never returns, so it cannot be dropped.
1 src/libs/kpunch/pkg/pkgManifest.c|memleak|Memory leak: f.name
# FP: the strdup'd name moves into op->drop by arrput (freed with the operation); the stb_ds OOM hook never returns, so it cannot be dropped.
1 src/libs/kpunch/pkg/pkgOp.c|memleak|Memory leak: copy.name
# FP: &detached is passed only when pkgSigRead filled it (hasDetached); taking its address otherwise reads nothing.
1 src/libs/kpunch/pkg/pkgPlan.c|uninitvar|Uninitialized variable: &detached
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/libs/kpunch/print/printFont.c|constParameterCallback|Parameter 'ctx' can be declared as pointer to const. However it seems that 'bandSpan' is a callback function, if 'ctx' is declared with const you might also need to cast function pointer(s).
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/libs/kpunch/print/printRaster.c|constParameterCallback|Parameter 'ctx' can be declared as pointer to const. However it seems that 'pictureBand' is a callback function, if 'ctx' is declared with const you might also need to cast function pointer(s).
# FP: style suggestion only (could be const), no defect.
1 src/libs/kpunch/print/printText.c|constVariable|Variable 'order' can be declared as const array
# FP: style suggestion only (could be const), no defect.
1 src/libs/kpunch/print/printText.c|constVariable|Variable 'starts' can be declared as const array
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/libs/kpunch/print/printUi.c|constParameterCallback|Parameter 'dlg' can be declared as pointer to const. However it seems that 'printDlgOk' is a callback function, if 'dlg' is declared with const you might also need to cast function pointer(s).
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/libs/kpunch/print/printUi.c|constParameterCallback|Parameter 'dlg' can be declared as pointer to const. However it seems that 'setupDlgOk' is a callback function, if 'dlg' is declared with const you might also need to cast function pointer(s).
# FP: style suggestion only (variable scope), no defect.
1 src/libs/kpunch/print/printUi.c|variableScope|The scope of the variable 'allText' can be reduced.
# FP: style suggestion only (variable scope), no defect.
1 src/libs/kpunch/print/printUi.c|variableScope|The scope of the variable 'msg' can be reduced.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/libs/kpunch/richtext/richRtf.c|unsignedLessThanZero|Checking if unsigned expression 'out.runs?((struct stbds_array_header*)(out.runs)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/libs/kpunch/richtext/richText.c|unsignedLessThanZero|Checking if unsigned expression 'dst->aligns?((struct stbds_array_header*)(dst->aligns)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/libs/kpunch/richtext/richText.c|unsignedLessThanZero|Checking if unsigned expression 'dst->runs?((struct stbds_array_header*)(dst->runs)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/libs/kpunch/richtext/richText.c|unsignedLessThanZero|Checking if unsigned expression 'rt->aligns?((struct stbds_array_header*)(rt->aligns)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/libs/kpunch/richtext/richText.c|unsignedLessThanZero|Checking if unsigned expression 'rt->runs?((struct stbds_array_header*)(rt->runs)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/libs/kpunch/richtext/richText.c|unsignedLessThanZero|Checking if unsigned expression 'rt->styles?((struct stbds_array_header*)(rt->styles)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/libs/kpunch/richtext/richText.c|unsignedLessThanZero|Checking if unsigned expression 'rt->text?((struct stbds_array_header*)(rt->text)-1)->capacity:0' is less than zero.
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/libs/kpunch/seclink/packet.c|constParameterCallback|Parameter 'ctx' can be declared as pointer to const. However it seems that 'portPending' is a callback function, if 'ctx' is declared with const you might also need to cast function pointer(s).
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/libs/kpunch/seclink/packet.c|constParameterCallback|Parameter 'ctx' can be declared as pointer to const. However it seems that 'portRead' is a callback function, if 'ctx' is declared with const you might also need to cast function pointer(s).
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/libs/kpunch/seclink/packet.c|constParameterCallback|Parameter 'ctx' can be declared as pointer to const. However it seems that 'portWrite' is a callback function, if 'ctx' is declared with const you might also need to cast function pointer(s).
# FP: style suggestion only (variable scope), no defect.
1 src/libs/kpunch/serial/rs232/rs232.c|variableScope|The scope of the variable 'i' can be reduced.
# FP: t is read only when done > 0, after the first block has written it (HKDF T(n-1)).
1 src/libs/kpunch/crypto/secHash.c|uninitvar|Uninitialized variable: t
# FP: the sample struct is hashed as bytes into the entropy pool; the members are written and read only as part of those bytes.
1 src/libs/kpunch/crypto/security.c|unusedStructMember|struct member 'EntropySampleT::tscHi' is never used.
# FP: the sample struct is hashed as bytes into the entropy pool; the members are written and read only as part of those bytes.
1 src/libs/kpunch/crypto/security.c|unusedStructMember|struct member 'EntropySampleT::tscLo' is never used.
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/libs/kpunch/sql/dvxSql.c|constParameterCallback|Parameter 'arg' can be declared as pointer to const. However it seems that 'progressCb' is a callback function, if 'arg' is declared with const you might also need to cast function pointer(s).
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/libs/kpunch/taskmgr/shellTaskMgr.c|unsignedLessThanZero|Checking if unsigned expression '(sCells)?((struct stbds_array_header*)(sCells)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/libs/kpunch/taskmgr/shellTaskMgr.c|unsignedLessThanZero|Checking if unsigned expression '(sRows)?((struct stbds_array_header*)(sRows)-1)->capacity:0' is less than zero.
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/libs/kpunch/texthelp/textHelp.c|constParameterCallback|Parameter 'w' can be declared as pointer to const. However it seems that 'textEditClearWidgetRef' is a callback function, if 'w' is declared with const you might also need to cast function pointer(s).
# FP: style suggestion only (variable scope), no defect.
1 src/libs/kpunch/texthelp/textHelp.c|variableScope|The scope of the variable 'vc' can be reduced.
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/loader/loaderMain.c|constParameterCallback|Parameter 'ctx' can be declared as pointer to const. However it seems that 'exportAdd' is a callback function, if 'ctx' is declared with const you might also need to cast function pointer(s).
# FP: style suggestion only (could be const), no defect.
1 src/tools/bmpDraw.c|constVariable|Variable 'pad' can be declared as const array
# FP: style suggestion only (could be const), no defect.
1 src/tools/proxy/proxy.c|constParameter|Parameter 'argv' can be declared as const array
# FP: style only: fds[1].events is reset for clarity before the next poll setup; no defect.
1 src/tools/proxy/proxy.c|unreadVariable|Variable 'fds[1].events' is assigned a value that is never used.
# FP: style suggestion only (variable scope), no defect.
1 src/tools/proxy/proxy.c|variableScope|The scope of the variable 'envPass' can be reduced.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/widgets/kpunch/ansiTerm/widgetAnsiTerm.c|unsignedLessThanZero|Checking if unsigned expression 'at->music?((struct stbds_array_header*)(at->music)-1)->capacity:0' is less than zero.
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/widgets/kpunch/canvas/widgetCanvas.c|constParameterCallback|Parameter 'w' can be declared as pointer to const. However it seems that 'wgtCanvasSave' is a callback function, if 'w' is declared with const you might also need to cast function pointer(s).
# FP: re-entrancy guard: a user callback run just before can destroy widgets and bump sWidgetGen; cppcheck cannot see callbacks change the global.
1 src/widgets/kpunch/canvas/widgetCanvas.c|knownConditionTrueFalse|Condition 'sWidgetGen==gen' is always true
# FP: style suggestion only (variable scope), no defect.
1 src/widgets/kpunch/dataCtrl/widgetDataCtrl.c|variableScope|The scope of the variable 'captionX' can be reduced.
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/widgets/kpunch/dbGrid/widgetDbGrid.c|constParameterCallback|Parameter 'dead' can be declared as pointer to const. However it seems that 'dbGridOnWidgetDestroyed' is a callback function, if 'dead' is declared with const you might also need to cast function pointer(s).
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/widgets/kpunch/helpView/widgetHelpView.c|constParameterCallback|Parameter 'userData' can be declared as pointer to const. However it seems that 'buildRecord' is a callback function, if 'userData' is declared with const you might also need to cast function pointer(s).
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/widgets/kpunch/helpView/widgetHelpView.c|constParameterCallback|Parameter 'w' can be declared as pointer to const. However it seems that 'helpRulePaint' is a callback function, if 'w' is declared with const you might also need to cast function pointer(s).
# FP: defensive bound check; the header branch above normally returns first, and the check keeps a negative row index impossible if that branch changes.
1 src/widgets/kpunch/listView/widgetListView.c|knownConditionTrueFalse|Condition 'relY<0' is always false
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/widgets/kpunch/listView/widgetListView.c|unsignedLessThanZero|Checking if unsigned expression '(text)?((struct stbds_array_header*)(text)-1)->capacity:0' is less than zero.
# FP: style suggestion only (variable scope), no defect.
1 src/widgets/kpunch/listView/widgetListView.c|variableScope|The scope of the variable 'textY' can be reduced.
# FP: right == left on the first and last rows of the diamond (dist 0), where no fill line is drawn.
1 src/widgets/kpunch/radio/widgetRadio.c|knownConditionTrueFalse|Condition 'right>left' is always true
# FP: wgtRichEditCopy is the RichEditApiT copy slot and the BASIC Copy method; both callback types take a WidgetT *, so the parameter cannot be const.
1 src/widgets/kpunch/richEdit/widgetRichEdit.c|constParameterCallback|Parameter 'w' can be declared as pointer to const. However it seems that 'wgtRichEditCopy' is a callback function, if 'w' is declared with const you might also need to cast function pointer(s).
# FP: wgtRichEditSaveFile is the RichEditApiT saveFile slot and the BASIC SaveFile method; both callback types take a WidgetT *, so the parameter cannot be const.
1 src/widgets/kpunch/richEdit/widgetRichEdit.c|constParameterCallback|Parameter 'w' can be declared as pointer to const. However it seems that 'wgtRichEditSaveFile' is a callback function, if 'w' is declared with const you might also need to cast function pointer(s).
# FP: widgetRichEditOnDragEnd is the class's WGT_METHOD_ON_DRAG_END handler; the handler type takes a WidgetT *, so the parameter cannot be const.
1 src/widgets/kpunch/richEdit/widgetRichEdit.c|constParameterCallback|Parameter 'w' can be declared as pointer to const. However it seems that 'widgetRichEditOnDragEnd' is a callback function, if 'w' is declared with const you might also need to cast function pointer(s).
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/widgets/kpunch/richEdit/widgetRichEdit.c|unsignedLessThanZero|Checking if unsigned expression '(*stack)?((struct stbds_array_header*)(*stack)-1)->capacity:0' is less than zero.
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/widgets/kpunch/richEdit/widgetRichEdit.c|unsignedLessThanZero|Checking if unsigned expression 'ed->fonts?((struct stbds_array_header*)(ed->fonts)-1)->capacity:0' is less than zero.
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/widgets/kpunch/textInput/widgetTextInput.c|constParameterCallback|Parameter 'w' can be declared as pointer to const. However it seems that 'wgtTextAreaCopy' is a callback function, if 'w' is declared with const you might also need to cast function pointer(s).
# FP: inside the stb_ds arrsetcap/arrsetlen macro expansion (unsigned capacity compared by the library macro), not DVX logic.
1 src/widgets/kpunch/textInput/widgetTextInput.c|unsignedLessThanZero|Checking if unsigned expression 'ta->markers?((struct stbds_array_header*)(ta->markers)-1)->capacity:0' is less than zero.
# FP: style only: the widget API macro's local sApi shadows the file-scope cache on purpose; no defect.
1 src/widgets/kpunch/toolbar/toolbar.h|shadowVariable|Local variable 'sApi' shadows outer variable
# FP: the function is used as a callback whose signature is fixed by the callback type; the parameter cannot be const.
1 src/widgets/kpunch/toolbar/widgetToolbar.c|constParameterCallback|Parameter 'w' can be declared as pointer to const. However it seems that 'widgetToolbarPaint' is a callback function, if 'w' is declared with const you might also need to cast function pointer(s).
# FP: treeFireItemClick returns false when a callback destroyed the tree (widget generation changed); cppcheck cannot see callbacks change it.
1 src/widgets/kpunch/treeView/widgetTreeView.c|knownConditionTrueFalse|Condition '!treeFireItemClick(item,multiClickDetect(vx,vy)>=2)' is always false
# FP: treeFireItemClick returns false when a callback destroyed the tree (widget generation changed); cppcheck cannot see callbacks change it.
1 src/widgets/kpunch/treeView/widgetTreeView.c|knownConditionTrueFalse|Condition '!treeFireItemClick(sel,true)' is always false
# FP: re-entrancy guard: a user callback run just before can destroy widgets and bump sWidgetGen; cppcheck cannot see callbacks change the global.
1 src/widgets/kpunch/treeView/widgetTreeView.c|knownConditionTrueFalse|Return value 'sWidgetGen==gen' is always true
