From: Francis Dupont Date: Fri, 20 Mar 2020 17:44:26 +0000 (+0100) Subject: [#949] Added a static cast to int isprint(int) X-Git-Tag: Kea-1.7.6~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9ff9e3433e537236a10ba41d4903e6943c55e07;p=thirdparty%2Fkea.git [#949] Added a static cast to int isprint(int) --- diff --git a/src/lib/util/strutil.h b/src/lib/util/strutil.h index 5a3a6c5e9c..885f769e77 100644 --- a/src/lib/util/strutil.h +++ b/src/lib/util/strutil.h @@ -346,7 +346,7 @@ typedef boost::shared_ptr StringSanitizerPtr; inline bool isPrintable(const std::string& content) { for (const auto& ch : content) { - if (isprint(ch) == 0) { + if (isprint(static_cast(ch)) == 0) { return (false); } } @@ -360,7 +360,7 @@ isPrintable(const std::string& content) { inline bool isPrintable(const std::vector& content) { for (const auto& ch : content) { - if (isprint(ch) == 0) { + if (isprint(static_cast(ch)) == 0) { return (false); } }