From 43cf3ae1f843b7de671c41ab62bf60c69f842392 Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Sun, 7 May 2017 11:34:20 -0700 Subject: [PATCH] Fix narrowing warning in table constants fix #344 --- CHANGELOG.md | 1 + include/beast/http/detail/rfc7230.hpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ef30d99..9319676c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ * Fix flat_streambuf * Add ub sanitizer blacklist * Add -funsigned-char to asan build target +* Fix narrowing warning in table constants WebSocket: diff --git a/include/beast/http/detail/rfc7230.hpp b/include/beast/http/detail/rfc7230.hpp index 518efb82..f5fba0a1 100644 --- a/include/beast/http/detail/rfc7230.hpp +++ b/include/beast/http/detail/rfc7230.hpp @@ -238,7 +238,7 @@ inline std::int8_t unhex(char c) { - static char constexpr tab[] = { + static signed char constexpr tab[] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 0 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 16 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 32