diff --git a/cppcheck.sup b/cppcheck.sup index ad756c123..360f39ef5 100644 --- a/cppcheck.sup +++ b/cppcheck.sup @@ -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 diff --git a/libveriuser/workarea.c b/libveriuser/workarea.c index 8d1dd4051..2bf2347f7 100644 --- a/libveriuser/workarea.c +++ b/libveriuser/workarea.c @@ -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; diff --git a/tgt-vlog95/cppcheck.sup b/tgt-vlog95/cppcheck.sup index b38771171..56911cf36 100644 --- a/tgt-vlog95/cppcheck.sup +++ b/tgt-vlog95/cppcheck.sup @@ -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 diff --git a/tgt-vvp/cppcheck.sup b/tgt-vvp/cppcheck.sup index 0382fec5d..1dbb8d11a 100644 --- a/tgt-vvp/cppcheck.sup +++ b/tgt-vvp/cppcheck.sup @@ -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 diff --git a/vhdlpp/cppcheck.sup b/vhdlpp/cppcheck.sup index b64b5963f..5613c1c10 100644 --- a/vhdlpp/cppcheck.sup +++ b/vhdlpp/cppcheck.sup @@ -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 diff --git a/vpi/cppcheck.sup b/vpi/cppcheck.sup index 42a76aabd..30a59239e 100644 --- a/vpi/cppcheck.sup +++ b/vpi/cppcheck.sup @@ -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 diff --git a/vvp/cppcheck.sup b/vvp/cppcheck.sup index 6f87b3b63..39319c661 100644 --- a/vvp/cppcheck.sup +++ b/vvp/cppcheck.sup @@ -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