File: gcc-15.patch

package info (click to toggle)
shapelib 1.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,884 kB
  • sloc: ansic: 10,567; sh: 4,620; cpp: 752; makefile: 192; pascal: 159
file content (27 lines) | stat: -rw-r--r-- 895 bytes parent folder | download
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
Description: Fix FTBFS with GCC 15 (bool is keyword).
Author: Bas Couwenberg <sebastic@debian.org>
Forwarded: https://github.com/OSGeo/shapelib/pull/188

--- a/dbfadd.c
+++ b/dbfadd.c
@@ -45,7 +45,7 @@ int main(int argc, char **argv)
     const int iRecord = DBFGetRecordCount(hDBF);
 
     SHPDate date;
-    char bool;
+    char boolean;
 
     // Loop assigning the new field values.
     for (int i = 0; i < DBFGetFieldCount(hDBF); i++)
@@ -64,9 +64,9 @@ int main(int argc, char **argv)
         }
         else if (DBFGetFieldInfo(hDBF, i, NULL, NULL, NULL) == FTLogical)
         {
-            if (1 == sscanf(argv[i + 2], "%c", &bool))
+            if (1 == sscanf(argv[i + 2], "%c", &boolean))
             {
-                DBFWriteLogicalAttribute(hDBF, iRecord, i, bool);
+                DBFWriteLogicalAttribute(hDBF, iRecord, i, boolean);
             }
         }
         else