[Scummvm-git-logs] scummvm master -> 9c909afd100a51098d0b857e0356c892c8e4e031
dreammaster
dreammaster at scummvm.org
Mon Jul 12 03:19:16 UTC 2021
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:
9c909afd10 AGS: gcc warning fix
Commit: 9c909afd100a51098d0b857e0356c892c8e4e031
https://github.com/scummvm/scummvm/commit/9c909afd100a51098d0b857e0356c892c8e4e031
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2021-07-11T20:18:45-07:00
Commit Message:
AGS: gcc warning fix
Changed paths:
engines/ags/engine/ac/string.cpp
engines/ags/lib/allegro/unicode.cpp
engines/ags/lib/allegro/unicode.h
diff --git a/engines/ags/engine/ac/string.cpp b/engines/ags/engine/ac/string.cpp
index b8f62a3d1b..61334af74a 100644
--- a/engines/ags/engine/ac/string.cpp
+++ b/engines/ags/engine/ac/string.cpp
@@ -212,7 +212,7 @@ int StrContains(const char *s1, const char *s2) {
ustrlwr(tempbuf1);
ustrlwr(tempbuf2);
- char *offs = ustrstr(tempbuf1, tempbuf2);
+ char *offs = const_cast<char *>(ustrstr(tempbuf1, tempbuf2));
if (offs == nullptr) {
free(tempbuf1);
diff --git a/engines/ags/lib/allegro/unicode.cpp b/engines/ags/lib/allegro/unicode.cpp
index 36626c9cdd..fe70ffcdef 100644
--- a/engines/ags/lib/allegro/unicode.cpp
+++ b/engines/ags/lib/allegro/unicode.cpp
@@ -1169,7 +1169,7 @@ char *ustrupr(char *s) {
return s;
}
-char *ustrstr(const char *s1, const char *s2) {
+const char *ustrstr(const char *s1, const char *s2) {
int len;
assert(s1);
assert(s2);
diff --git a/engines/ags/lib/allegro/unicode.h b/engines/ags/lib/allegro/unicode.h
index 5ea82c03f9..e642c880d5 100644
--- a/engines/ags/lib/allegro/unicode.h
+++ b/engines/ags/lib/allegro/unicode.h
@@ -112,7 +112,7 @@ extern char *ustrupr(char *s);
/* ustrstr:
* Unicode-aware version of the ANSI strstr() function.
*/
-extern char *ustrstr(const char *s1, const char *s2);
+extern const char *ustrstr(const char *s1, const char *s2);
/* usetat:
* Modifies the character at the specified index within the string,
* handling adjustments for variable width data. Returns how far the
More information about the Scummvm-git-logs
mailing list