Cleanup cppcheck

This commit is contained in:
Cary R 2026-02-24 23:53:02 -08:00
parent 4af84bfaad
commit 15d6e83f8d
7 changed files with 24 additions and 4 deletions

View File

@ -44,6 +44,11 @@ thisSubtraction:netlist.h:5318
// debugger_release
knownConditionTrueFalse:main.cc:931
// These should be checked, but are not real issues
knownConditionTrueFalse:elaborate.cc:7621
knownConditionTrueFalse:elab_sig.cc:271
knownConditionTrueFalse:elab_sig.cc:338
// Yes, it's a duplicate
duplicateCondition:elaborate.cc:7672
@ -53,6 +58,12 @@ useStlAlgorithm:map_named_args.cc:38
// The condition is always true at least once based on the previous assertion
derefInvalidIterator:netmisc.cc:420
// By convention we put statics at the top scope.
variableScope:t-dll.cc:2377
// We check memory allocation with valgrind
unsafeClassCanLeak:libmisc/StringHeap.h:79
// We only use a StringHeap or a StringHepLex
duplInheritedMember:libmisc/StringHeap.h:99
duplInheritedMember:libmisc/StringHeap.h:100

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2002-2020 Stephen Williams (steve@icarus.com)
* Copyright (c) 2002-2026 Stephen Williams (steve@icarus.com)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form under the terms of the GNU
@ -60,7 +60,7 @@ PLI_INT32 tf_setworkarea(void*workarea)
PLI_BYTE8* tf_getworkarea(void)
{
struct workarea_cell*cur;
const struct workarea_cell*cur;
cur = area_list;

View File

@ -5,7 +5,9 @@ nullPointerOutOfMemory:logic_lpm.c:2247 // strdup @ 2244
nullPointerOutOfMemory:misc.c:39 // malloc @ 38
nullPointerOutOfMemory:misc.c:794 // malloc @ 793
nullPointerOutOfMemory:misc.c:795 // malloc @ 793
nullPointerOutOfMemory:numbers.c:362 // strdup @ 348
nullPointerOutOfMemory:numbers.c:362 // strdup @ 359
nullPointerOutOfMemory:numbers.c:363 // strdup @ 359
nullPointerOutOfMemory:numbers.c:391 // strdup @ 359
nullPointerOutOfMemory:scope.c:301 // malloc @ 300
nullPointerOutOfMemory:scope.c:302 // malloc @ 300
nullPointerOutOfMemory:scope.c:303 // malloc @ 300

View File

@ -41,6 +41,7 @@ nullPointerOutOfMemory:vvp_scope.c:1746 // malloc @ 1684
nullPointerOutOfMemory:vvp_scope.c:1757 // malloc @ 1684
nullPointerOutOfMemory:vvp_scope.c:1764 // malloc @ 1684
nullPointerOutOfMemory:vvp_scope.c:1991 // calloc @ 1989
nullPointerOutOfMemory:vvp_scope.c:2028 // calloc @ 1989
nullPointerOutOfMemory:vvp_scope.c:2062 // calloc @ 2060
nullPointerOutOfMemory:vvp_scope.c:2077 // calloc @ 2060
nullPointerArithmeticOutOfMemory:stmt_assign.c:216 // calloc @ 619

View File

@ -9,6 +9,9 @@ incorrectStringBooleanError:expression_stream.cc:158
// cppcheck is wrong this cannot be a const
constVariableReference:library.cc:255
// We check memory allocation with valgrind
unsafeClassCanLeak:libmisc/StringHeap.h:79
// We only use a StringHeap or a StringHepLex
duplInheritedMember:libmisc/StringHeap.h:99
duplInheritedMember:libmisc/StringHeap.h:100

View File

@ -4,6 +4,9 @@ nullPointerArithmeticOutOfMemory
nullPointerOutOfMemory
memleakOnRealloc
// We check memory allocation with valgrind
nullPointer:sys_display.c:931
// Skip asctime() obsolete for now.
asctimeCalled:sys_fst.c:381
asctimeCalled:sys_vcd.c:443

View File

@ -80,7 +80,7 @@ duplicateValueTernary:class_type.cc:268
// cppcheck is wrong this can be true or false
knownConditionTrueFalse:vthread.cc:2986
knownConditionTrueFalse:vpi_priv.cc:681
knownConditionTrueFalse:vpi_priv.cc:1979
knownConditionTrueFalse:vpi_priv.cc:2030
// cppcheck is wrong this is already const
constParameterPointer:vpi_tasks.cc:259