diff --git a/src/V3LinkDot.cpp b/src/V3LinkDot.cpp index 969f510dd..64eaf05fe 100644 --- a/src/V3LinkDot.cpp +++ b/src/V3LinkDot.cpp @@ -3365,6 +3365,8 @@ class LinkDotResolveVisitor final : public VNVisitor { VL_DO_DANGLING(pushDeletep(nodep), nodep); ok = true; m_ds.m_dotText = ""; + } else { + (void)defp; // Prevent unused variable warning } } else if (AstEnumItem* const valuep = VN_CAST(foundp->nodep(), EnumItem)) { if (allowVar) { diff --git a/src/flexfix b/src/flexfix index a6479b8e1..b834453c3 100755 --- a/src/flexfix +++ b/src/flexfix @@ -18,13 +18,17 @@ for line in sys.stdin: # Fix flex 2.6.1 warning line = re.sub(r'for \( i = 0; i < _yybytes_len; \+\+i \)', r'for ( i = 0; (yy_size_t)(i) < (yy_size_t)(_yybytes_len); ++i )', line) - # Fix flex 2.6.0 warning + # Fix flex 2.6.0+ sign comparison warnings line = re.sub( r'\(\(int\) \(\(yy_n_chars\) \+ number_to_move\) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size\)', r'((int) ((yy_n_chars) + number_to_move) > (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size)', line) line = re.sub(r' number_to_move == YY_MORE_ADJ ', r' (int)number_to_move == (int)YY_MORE_ADJ ', line) + line = re.sub( + r'\(\(\(yy_n_chars\) \+ number_to_move\) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size\)', + r'(((int)(yy_n_chars) + (int)number_to_move) > (int)YY_CURRENT_BUFFER_LVALUE->yy_buf_size)', + line) # Fix flex 2.5.4 namespace omission line = re.sub(r'^class istream;', '#include \nusing namespace std;\n', line) # Fix flex 2.5.31 redefinition