diff options
author | Mathias Preiner <mathias.preiner@gmail.com> | 2020-03-05 11:42:54 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-05 11:42:54 -0800 |
commit | 04039407e6308070c148de0d5e93640ec1b0a341 (patch) | |
tree | b66f63d49df0713b1ca2a440bec89f1d60af32a4 /src/printer/cvc | |
parent | 18fe192c29a9a2c37d1925730af01e906b9888c5 (diff) |
Enable -Wshadow and fix warnings. (#3909)
Fixes all -Wshadow warnings and enables the -Wshadow compile flag globally.
Co-authored-by: Clark Barrett <barrett@cs.stanford.edu>
Co-authored-by: Andres Noetzli <andres.noetzli@gmail.com>
Co-authored-by: Aina Niemetz <aina.niemetz@gmail.com>
Co-authored-by: Alex Ozdemir <aozdemir@hmc.edu>
Co-authored-by: makaimann <makaim@stanford.edu>
Co-authored-by: yoni206 <yoni206@users.noreply.github.com>
Co-authored-by: Andrew Reynolds <andrew.j.reynolds@gmail.com>
Co-authored-by: AleksandarZeljic <zeljic@stanford.edu>
Co-authored-by: Caleb Donovick <cdonovick@users.noreply.github.com>
Co-authored-by: Amalee <amaleewilson@gmail.com>
Co-authored-by: Scott Kovach <dskovach@gmail.com>
Co-authored-by: ntsis <nekuna@gmail.com>
Diffstat (limited to 'src/printer/cvc')
-rw-r--r-- | src/printer/cvc/cvc_printer.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/printer/cvc/cvc_printer.cpp b/src/printer/cvc/cvc_printer.cpp index 70324d313..3120fe8f1 100644 --- a/src/printer/cvc/cvc_printer.cpp +++ b/src/printer/cvc/cvc_printer.cpp @@ -144,9 +144,10 @@ void CvcPrinter::toStream( const BitVector& bv = n.getConst<BitVector>(); const Integer& x = bv.getValue(); out << "0bin"; - unsigned n = bv.getSize(); - while(n-- > 0) { - out << (x.testBit(n) ? '1' : '0'); + unsigned size = bv.getSize(); + while (size-- > 0) + { + out << (x.testBit(size) ? '1' : '0'); } break; } @@ -1495,12 +1496,16 @@ static void toStream(std::ostream& out, out << " | "; } firstConstructor = false; - const DatatypeConstructor& c = *j; - out << c.getName(); - if(c.getNumArgs() > 0) { + const DatatypeConstructor& cons = *j; + out << cons.getName(); + if (cons.getNumArgs() > 0) + { out << '('; bool firstSelector = true; - for(DatatypeConstructor::const_iterator k = c.begin(); k != c.end(); ++k) { + for (DatatypeConstructor::const_iterator k = cons.begin(); + k != cons.end(); + ++k) + { if(! firstSelector) { out << ", "; } |