Merge pull request #95 from blockparty-sh/unused-variable-warning

Suppress unused variable warning
This commit is contained in:
Toru Niina 2019-11-23 12:59:21 +09:00 committed by GitHub
commit 63fdbd25cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,6 +45,7 @@ inline std::string show_char(const char c)
buf.fill('\0');
const auto r = std::snprintf(
buf.data(), buf.size(), "0x%02x", static_cast<int>(c) & 0xFF);
(void) r; // Unused variable warning
assert(r == static_cast<int>(buf.size()) - 1);
return std::string(buf.data());
}