File: 01-fix-conversion-error.patch

package info (click to toggle)
libtcod 1.24.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,756 kB
  • sloc: ansic: 46,186; cpp: 13,523; python: 4,814; makefile: 44; sh: 25
file content (31 lines) | stat: -rw-r--r-- 914 bytes parent folder | download | duplicates (2)
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(&params, &g_context) < 0) fatal("Could not open context: %s", TCOD_get_error());