From 31c9e26e2e370cb3502087c351d577cc8d751ae6 Mon Sep 17 00:00:00 2001 From: David Horton Date: Sat, 9 Jul 2016 04:09:34 -0400 Subject: [PATCH] Fix compiler warning in GCC 6. Signed-off-by: Wilson Snyder --- Changes | 2 ++ include/verilated.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index 0a023db09..487c8ec48 100644 --- a/Changes +++ b/Changes @@ -10,6 +10,8 @@ indicates the contributor was also the author of the fix; Thanks! **** Fix false warnings on non-power-2 enums using .next/.prev. +**** Fix compiler warning in GCC 6. [David Horton] + * Verilator 3.884 2016-05-18 diff --git a/include/verilated.cpp b/include/verilated.cpp index 1cef48cc2..269f81e48 100644 --- a/include/verilated.cpp +++ b/include/verilated.cpp @@ -1226,7 +1226,7 @@ VerilatedModule::VerilatedModule(const char* namep) } VerilatedModule::~VerilatedModule() { - if (m_namep) free((void*)m_namep); m_namep=NULL; + if (m_namep) { free((void*)m_namep); m_namep=NULL; } } //======================================================================