[postgis-commits] svn - r2759 - trunk/loader

postgis-commits at postgis.refractions.net postgis-commits at postgis.refractions.net
Tue Apr 8 14:36:51 PDT 2008


Author: pramsey
Date: 2008-04-08 14:36:50 -0700 (Tue, 08 Apr 2008)
New Revision: 2759

Modified:
   trunk/loader/shp2pgsql.c
Log:
Fix string literal comparison warnings: "comparison with string literal results in
unspecified behaviour"


Modified: trunk/loader/shp2pgsql.c
===================================================================
--- trunk/loader/shp2pgsql.c	2008-04-07 20:09:48 UTC (rev 2758)
+++ trunk/loader/shp2pgsql.c	2008-04-08 21:36:50 UTC (rev 2759)
@@ -783,7 +783,7 @@
 	}
 
 	if (!dump_format) printf("'");
-	if ( sr_id && sr_id != "-1" ) printf("SRID=%s;", sr_id);
+	if ( sr_id && strcmp(sr_id,"-1") ) printf("SRID=%s;", sr_id);
 
 	if (simple_geometries==0) // We write MULTI geometries, so generate Header 
 	{
@@ -1066,7 +1066,7 @@
 	out_index = FindPolygons(obj, &Outer);
 
 	if (!dump_format) printf("'");
-	if ( sr_id && sr_id != "-1" ) printf("SRID=%s;", sr_id);
+	if ( sr_id && strcmp(sr_id,"-1") ) printf("SRID=%s;", sr_id);
 
 	if (simple_geometries==0) // We write MULTI geometries, so generate Header 
 	{
@@ -1202,7 +1202,7 @@
 InsertPoint(void)
 {
 	if (!dump_format) printf("'");
-	if ( sr_id && sr_id != "-1" ) printf("SRID=%s;", sr_id);
+	if ( sr_id && strcmp(sr_id,"-1") ) printf("SRID=%s;", sr_id);
 
 	print_wkb_byte(getEndianByte());
 	print_wkb_int(wkbtype);
@@ -1240,7 +1240,7 @@
 		(wkbtype&WKBMOFFSET);
 
 	if (!dump_format) printf("'");
-	if ( sr_id && sr_id != "-1" ) printf("SRID=%s;", sr_id);
+	if ( sr_id && strcmp(sr_id,"-1") ) printf("SRID=%s;", sr_id);
 
 	print_wkb_byte(getEndianByte());
 	print_wkb_int(wkbtype);



More information about the postgis-commits mailing list