1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
Description: Fix incompatible pointer type build error
Author: Nikolay Shaplov
Forwarded: not-needed
Last-Update: 2025-02-22
---
Since g++ 14 converting incompatible pointer type is considered an error
Fix imported from upstream main branch commit
---
commit bc1824038fa38303512ac7b7bfc137ef28d8e86b
Author: Kyle Benesch <4b796c65+github@gmail.com>
Date: Sat Jun 29 01:58:53 2024 -0700
Add explicit const cast for argv
Needed to suppress a GCC warning.
diff --git a/samples/samples_c.c b/samples/samples_c.c
index ed3d1673..dfca5139 100644
--- a/samples/samples_c.c
+++ b/samples/samples_c.c
@@ -1658,7 +1658,7 @@ int main(int argc, char* argv[]) {
.tileset = tileset,
.vsync = false,
.argc = argc,
- .argv = argv,
+ .argv = (const char* const*)argv,
};
if (TCOD_context_new(¶ms, &g_context) < 0) fatal("Could not open context: %s", TCOD_get_error());
|