Fix Cppcheck warnings

This commit is contained in:
Daniel Marjamäki 2019-09-17 22:28:36 +02:00
parent 2d651b09fc
commit b66d701599
2 changed files with 5 additions and 1 deletions

View File

@ -27,6 +27,7 @@
std::string ExprEngine::str(int128_t value)
{
std::ostringstream ostr;
#ifdef __GNUC__
if (value == (int)value) {
ostr << (int) value;
return ostr.str();
@ -41,6 +42,9 @@ std::string ExprEngine::str(int128_t value)
if (high > 0)
ostr << "h" << std::hex << high << "l";
ostr << std::hex << low;
#else
ostr << value;
#endif
return ostr.str();
}

View File

@ -135,7 +135,7 @@ namespace ExprEngine {
class StructValue: public Value {
public:
StructValue(const std::string &name) : Value(name) {}
explicit StructValue(const std::string &name) : Value(name) {}
ValueType type() const override {
return ValueType::StructValue;
}