From 80678ae7bc4d7111e76efc670441151995c6e02f Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Thu, 31 Mar 2016 22:26:49 -0400 Subject: [PATCH] Fix clang 3.8.0 warnings. --- include/verilated.cpp | 3 ++- src/V3AstNodes.h | 3 ++- src/flexfix | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/verilated.cpp b/include/verilated.cpp index e5f98c564..f46b6d6e9 100644 --- a/include/verilated.cpp +++ b/include/verilated.cpp @@ -961,7 +961,8 @@ void VL_READMEM_W(bool hex, int width, int depth, int array_lsb, int fnwords, } void VL_READMEM_N(bool hex, int width, int depth, int array_lsb, int fnwords, - const string& ofilenamep, void* memp, IData start, IData end) { + const string& ofilenamep, void* memp, IData start, IData end) { + if (fnwords) {} FILE* fp = fopen(ofilenamep.c_str(), "r"); if (VL_UNLIKELY(!fp)) { // We don't report the Verilog source filename as it slow to have to pass it down diff --git a/src/V3AstNodes.h b/src/V3AstNodes.h index b5ccb1626..8c43f86bf 100644 --- a/src/V3AstNodes.h +++ b/src/V3AstNodes.h @@ -722,10 +722,11 @@ public: virtual int widthTotalBytes() const { return subDTypep()->widthTotalBytes(); } }; -struct AstParseTypeDType : public AstNodeDType { +class AstParseTypeDType : public AstNodeDType { // Parents: VAR // During parsing, this indicates the type of a parameter is a "parameter type" // e.g. the data type is a container of any data type +public: AstParseTypeDType(FileLine* fl) : AstNodeDType(fl) {} ASTNODE_NODE_FUNCS(ParseTypeDType, PARSETYPEDTYPE) diff --git a/src/flexfix b/src/flexfix index dda8e8d97..3a563c41e 100755 --- a/src/flexfix +++ b/src/flexfix @@ -19,6 +19,7 @@ my $Opt_Prefix = $ARGV[0] or die "%Error: No prefix specified,"; foreach my $line () { # Fix flex 2.6.0 warning + $line =~ s/ > YY_CURRENT_BUFFER_LVALUE->yy_buf_size/ > (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size/; $line =~ s/ number_to_move == YY_MORE_ADJ / (int)number_to_move == (int)YY_MORE_ADJ /; # Fix flex 2.5.4 namespace omission $line =~ s/^class istream;/\#include \nusing namespace std;\n/;