[GRASS-SVN] r52516 - grass/trunk/general/g.proj

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Aug 3 22:06:23 PDT 2012


Author: marisn
Date: 2012-08-03 22:06:23 -0700 (Fri, 03 Aug 2012)
New Revision: 52516

Modified:
   grass/trunk/general/g.proj/input.c
Log:
Silence compiler warnings

Modified: grass/trunk/general/g.proj/input.c
===================================================================
--- grass/trunk/general/g.proj/input.c	2012-08-04 01:54:31 UTC (rev 52515)
+++ grass/trunk/general/g.proj/input.c	2012-08-04 05:06:23 UTC (rev 52516)
@@ -88,7 +88,7 @@
     if (infd) {
 	fread(buff, sizeof(buff), 1, infd);
 	if (ferror(infd))
-	    G_fatal_error(_("Error reading WKT projection description"));
+	    G_fatal_error("%s", _("Error reading WKT projection description"));
 	else
 	    fclose(infd);
 	/* Get rid of newlines */
@@ -140,7 +140,7 @@
 
     hSRS = OSRNewSpatialReference(NULL);
     if (OSRImportFromProj4(hSRS, proj4string) != OGRERR_NONE)
-	G_fatal_error(_("Can't parse PROJ.4-style parameter string"));
+	G_fatal_error("%s", _("Can't parse PROJ.4-style parameter string"));
 
     G_free(proj4string);
 
@@ -178,7 +178,7 @@
 
     hSRS = OSRNewSpatialReference(NULL);
     if (OSRImportFromEPSG(hSRS, epsg_num) != OGRERR_NONE)
-	G_fatal_error(_("Unable to translate EPSG code"));
+	G_fatal_error("%s", _("Unable to translate EPSG code"));
 
     ret = GPJ_osr_to_grass(&cellhd, &projinfo, &projunits, hSRS, 0);
 
@@ -215,7 +215,7 @@
 
     /* Try opening file with OGR first because it doesn't output a
      * (potentially confusing) error message if it can't open the file */
-    G_message(_("Trying to open with OGR..."));
+    G_message("%s", _("Trying to open with OGR..."));
     OGRRegisterAll();
 
     if ((ogr_ds = OGROpen(geofile, FALSE, NULL))
@@ -223,7 +223,7 @@
 	OGRLayerH ogr_layer;
 	OGRSpatialReferenceH ogr_srs;
 
-	G_message(_("...succeeded."));
+	G_message("%s", _("...succeeded."));
 	/* Get the first layer */
 	ogr_layer = OGR_DS_GetLayer(ogr_ds, 0);
 	ogr_srs = OGR_L_GetSpatialRef(ogr_layer);
@@ -236,13 +236,13 @@
 	/* Try opening with GDAL */
 	GDALDatasetH gdal_ds;
 
-	G_message(_("Trying to open with GDAL..."));
+	G_message("%s", _("Trying to open with GDAL..."));
 	GDALAllRegister();
 
 	if ((gdal_ds = GDALOpen(geofile, GA_ReadOnly))) {
 	    char *wktstring;
 
-	    G_message(_("...succeeded."));
+	    G_message("%s", _("...succeeded."));
 	    wktstring = (char *)GDALGetProjectionRef(gdal_ds);
 	    ret =
 		GPJ_wkt_to_grass(&cellhd, &projinfo, &projunits, wktstring,



More information about the grass-commit mailing list