diff --git a/lib/univalue_read.cpp b/lib/univalue_read.cpp index f8a5d4d..be39bfe 100644 --- a/lib/univalue_read.cpp +++ b/lib/univalue_read.cpp @@ -227,7 +227,7 @@ enum jtokentype getJsonToken(std::string& tokenVal, unsigned int& consumed, } else { - writer.push_back(*raw); + writer.push_back(static_cast(*raw)); raw++; } } @@ -244,7 +244,7 @@ enum jtokentype getJsonToken(std::string& tokenVal, unsigned int& consumed, } } -enum expect_bits { +enum expect_bits : unsigned { EXP_OBJ_NAME = (1U << 0), EXP_COLON = (1U << 1), EXP_ARR_VALUE = (1U << 2), diff --git a/lib/univalue_write.cpp b/lib/univalue_write.cpp index db039fc..3a2c580 100644 --- a/lib/univalue_write.cpp +++ b/lib/univalue_write.cpp @@ -13,13 +13,13 @@ static std::string json_escape(const std::string& inS) outS.reserve(inS.size() * 2); for (unsigned int i = 0; i < inS.size(); i++) { - unsigned char ch = inS[i]; + unsigned char ch = static_cast(inS[i]); const char *escStr = escapes[ch]; if (escStr) outS += escStr; else - outS += ch; + outS += static_cast(ch); } return outS;