diff --git a/src/V3LinkInc.cpp b/src/V3LinkInc.cpp index 44f3cde8f..379b5f3e9 100644 --- a/src/V3LinkInc.cpp +++ b/src/V3LinkInc.cpp @@ -176,7 +176,7 @@ private: void prepost_stmt_visit(AstNodeTriop* nodep) { iterateChildren(nodep); - AstNodeVarRef* varrefp; + AstNodeVarRef* varrefp = nullptr; if (m_unsupportedHere || !(varrefp = VN_CAST(nodep->rhsp(), VarRef))) { nodep->v3warn(E_UNSUPPORTED, "Unsupported: Incrementation in this context."); return; diff --git a/src/V3Options.cpp b/src/V3Options.cpp index 49a65e5ac..52b24f349 100644 --- a/src/V3Options.cpp +++ b/src/V3Options.cpp @@ -815,7 +815,7 @@ string V3Options::protectKeyDefaulted() { void V3Options::throwSigsegv() { // LCOV_EXCL_START #if !(defined(VL_CPPCHECK) || defined(__clang_analyzer__)) // clang-format off - { char* zp = nullptr; *zp = 0; } // Intentional core dump, ignore warnings here + *static_cast(nullptr) = 0; // Intentional core dump, ignore warnings here // clang-format on #endif } // LCOV_EXCL_STOP