--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: drawmap: FTBFS with gcc-3.4: label at end of compound statement
- From: Andreas Jochens <aj@andaco.de>
- Date: Sat, 10 Jul 2004 20:24:08 +0200
- Message-id: <E1BjMW8-0000Dn-JN@localhost>
Package: drawmap
Severity: normal
Tags: patch
When building 'drawmap' with gcc-3.4 I get the following error:
drawmap.h:199: warning: conflicting types for built-in function 'round'
In file included from dem.c:25:
drawmap.h:199: warning: conflicting types for built-in function 'round'
In file included from dem_sdts.c:27:
drawmap.h:199: warning: conflicting types for built-in function 'round'
In file included from dlg.c:28:
drawmap.h:199: warning: conflicting types for built-in function 'round'
dlg.c: In function `draw_lines':
dlg.c:1178: error: label at end of compound statement
In file included from dlg_sdts.c:33:
drawmap.h:199: warning: conflicting types for built-in function 'round'
In file included from sdts_utils.c:30:
drawmap.h:199: warning: conflicting types for built-in function 'round'
In file included from gtopo30.c:31:
drawmap.h:199: warning: conflicting types for built-in function 'round'
In file included from utilities.c:24:
drawmap.h:199: warning: conflicting types for built-in function 'round'
make[1]: *** [drawmap] Error 1
make[1]: Leaving directory `/drawmap-2.5'
make: *** [build-stamp] Error 2
With the attached patch 'drawmap' can be compiled using gcc-3.4.
Regards
Andreas Jochens
diff -urN ../tmp-orig/drawmap-2.5/drawmap.h ./drawmap.h
--- ../tmp-orig/drawmap-2.5/drawmap.h 2000-08-02 04:45:40.000000000 +0200
+++ ./drawmap.h 2004-07-10 20:17:11.725782873 +0200
@@ -196,6 +196,7 @@
+#define round(x) lround(x) /* avoid type conflict with built-in function */
long round(double);
long max(long, long);
double max3(double, double, double);
diff -urN ../tmp-orig/drawmap-2.5/dlg.c ./dlg.c
--- ../tmp-orig/drawmap-2.5/dlg.c 2001-08-02 08:27:29.000000000 +0200
+++ ./dlg.c 2004-07-10 20:15:39.845421175 +0200
@@ -1156,25 +1156,17 @@
if (pointflags & 1) {
latitude2 = p_lat1;
longitude2 = image_corners->sw_long;
- goto DONE2;
- }
- if (pointflags & 2) {
+ } else if (pointflags & 2) {
latitude2 = p_lat2;
longitude2 = image_corners->ne_long;
- goto DONE2;
- }
- if (pointflags & 4) {
+ } else if (pointflags & 4) {
latitude2 = image_corners->sw_lat;
longitude2 = p_long1;
- goto DONE2;
- }
- if (pointflags & 8) {
+ } else if (pointflags & 8) {
latitude2 = image_corners->ne_lat;
longitude2 = p_long2;
- goto DONE2;
}
}
-DONE2:
}
--- End Message ---