Clean a few warnings emited by GCC v8

An instance of catching an exception by value:

  https://blog.knatten.org/2010/04/02/always-catch-exceptions-by-reference/

In jsontool, there's a warning about writing 8 bytes into a 7
byte buffer, potentially truncating or losing the nul-terminator.

There are a couple of instances of an unused bool variable, not
really a big deal.
This commit is contained in:
Monty Taylor
2020-05-17 09:43:24 -05:00
parent ddb79937d9
commit efa40d20ab
3 changed files with 2 additions and 7 deletions
+1 -1
View File
@@ -111,7 +111,7 @@ std::string sort_quote(const char *s) {
for (size_t i = 0; i < utf32.size(); i++) {
if (utf32[i] < 0xD800) {
char buf[7];
char buf[8];
sprintf(buf, "\\u%04lu", utf32[i]);
ret.append(std::string(buf));
} else {