]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#949] Added a static cast to int isprint(int)
authorFrancis Dupont <fdupont@isc.org>
Fri, 20 Mar 2020 17:44:26 +0000 (18:44 +0100)
committerFrancis Dupont <fdupont@isc.org>
Fri, 20 Mar 2020 18:28:21 +0000 (18:28 +0000)
src/lib/util/strutil.h

index 5a3a6c5e9c2a3d7c515ce59d733c5d57877e9e77..885f769e77551ea1dc6b47bcc421bd4c2e758171 100644 (file)
@@ -346,7 +346,7 @@ typedef boost::shared_ptr<StringSanitizer> StringSanitizerPtr;
 inline bool
 isPrintable(const std::string& content) {
     for (const auto& ch : content) {
-        if (isprint(ch) == 0) {
+        if (isprint(static_cast<int>(ch)) == 0) {
             return (false);
         }
     }
@@ -360,7 +360,7 @@ isPrintable(const std::string& content) {
 inline bool
 isPrintable(const std::vector<uint8_t>& content) {
     for (const auto& ch : content) {
-        if (isprint(ch) == 0) {
+        if (isprint(static_cast<int>(ch)) == 0) {
             return (false);
         }
     }