[Scummvm-git-logs] scummvm master -> ad046b15893030d8b3cc48b4dba76e99902cba43
antoniou79
a.antoniou79 at gmail.com
Sat Feb 1 16:24:17 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
ad046b1589 NETWORKING: Fix compiler warning about always false comparison
Commit: ad046b15893030d8b3cc48b4dba76e99902cba43
https://github.com/scummvm/scummvm/commit/ad046b15893030d8b3cc48b4dba76e99902cba43
Author: Thanasis Antoniou (a.antoniou79 at gmail.com)
Date: 2020-02-01T18:22:38+02:00
Commit Message:
NETWORKING: Fix compiler warning about always false comparison
warning: comparison is always false due to limited range of data type [-Wtype-limits]
s is Common::String. s[i] is thus a "char". If char is signed 8bit then the comparison will indeed always be false.
Changed paths:
backends/networking/sdl_net/handlers/filespagehandler.cpp
diff --git a/backends/networking/sdl_net/handlers/filespagehandler.cpp b/backends/networking/sdl_net/handlers/filespagehandler.cpp
index 72e2300..f8b1899 100644
--- a/backends/networking/sdl_net/handlers/filespagehandler.cpp
+++ b/backends/networking/sdl_net/handlers/filespagehandler.cpp
@@ -56,7 +56,7 @@ Common::String encodeHtmlEntities(Common::String s) {
result += ">";
else if (s[i] == '&')
result += "&";
- else if (s[i] > (byte)0x7F)
+ else if ((byte)s[i] > (byte)0x7F)
result += Common::String::format("&#%d;", (int)s[i]);
else result += s[i];
return result;
More information about the Scummvm-git-logs
mailing list