[GRASS-SVN] r59715 - in grass/trunk: general/g.mapset general/g.region lib/db/dbmi_client lib/ogsf lib/proj lib/symbol raster/r.out.ppm raster/r.to.vect vector/v.surf.rst vector/v.to.3d

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Apr 13 12:01:14 PDT 2014


Author: neteler
Date: 2014-04-13 12:01:14 -0700 (Sun, 13 Apr 2014)
New Revision: 59715

Modified:
   grass/trunk/general/g.mapset/main.c
   grass/trunk/general/g.region/main.c
   grass/trunk/lib/db/dbmi_client/delete_tab.c
   grass/trunk/lib/ogsf/gvl_calc.c
   grass/trunk/lib/proj/get_proj.c
   grass/trunk/lib/symbol/read.c
   grass/trunk/raster/r.out.ppm/main.c
   grass/trunk/raster/r.to.vect/areas_io.c
   grass/trunk/vector/v.surf.rst/main.c
   grass/trunk/vector/v.to.3d/trans3.c
Log:
fix compiler warnings (contributed by Volker Froehlich, sync of r59714)

Modified: grass/trunk/general/g.mapset/main.c
===================================================================
--- grass/trunk/general/g.mapset/main.c	2014-04-13 18:57:15 UTC (rev 59714)
+++ grass/trunk/general/g.mapset/main.c	2014-04-13 19:01:14 UTC (rev 59715)
@@ -181,7 +181,7 @@
     G_asprintf(&lock_prog, "%s/etc/lock", G_gisbase());
 
     sprintf(path, "%s/.gislock", mapset_new_path);
-    G_debug(2, path);
+    G_debug(2, "%s", path);
     
     ret = G_spawn(lock_prog, lock_prog, path, gis_lock, NULL);
     G_debug(2, "lock result = %d", ret);

Modified: grass/trunk/general/g.region/main.c
===================================================================
--- grass/trunk/general/g.region/main.c	2014-04-13 18:57:15 UTC (rev 59714)
+++ grass/trunk/general/g.region/main.c	2014-04-13 19:01:14 UTC (rev 59715)
@@ -512,7 +512,7 @@
 	    Vect_set_open_level(2);
 	    if (2 > Vect_open_old(&Map, vect_name, mapset))
 		G_fatal_error(_("Unable to open vector map <%s> on topological level"),
-			      vect_name, mapset);
+			      vect_name);
             
 	    Vect_get_map_box(&Map, &box);
 	    map_window = window;

Modified: grass/trunk/lib/db/dbmi_client/delete_tab.c
===================================================================
--- grass/trunk/lib/db/dbmi_client/delete_tab.c	2014-04-13 18:57:15 UTC (rev 59714)
+++ grass/trunk/lib/db/dbmi_client/delete_tab.c	2014-04-13 19:01:14 UTC (rev 59715)
@@ -47,7 +47,7 @@
     db_init_string(&sql);
     db_set_string(&sql, "drop table ");
     db_append_string(&sql, tblname);
-    G_debug(3, db_get_string(&sql));
+    G_debug(3, "%s", db_get_string(&sql));
 
     if (db_execute_immediate(driver, &sql) != DB_OK) {
 	G_warning(_("Unable to drop table: '%s'"),

Modified: grass/trunk/lib/ogsf/gvl_calc.c
===================================================================
--- grass/trunk/lib/ogsf/gvl_calc.c	2014-04-13 18:57:15 UTC (rev 59714)
+++ grass/trunk/lib/ogsf/gvl_calc.c	2014-04-13 19:01:14 UTC (rev 59715)
@@ -746,7 +746,7 @@
 	}
 
 	G_debug(3,
-		"gvl_write_char(): reallocate memory for pos : %d to : %d B",
+		"gvl_write_char(): reallocate memory for pos : %d to : %lu B",
 		pos, sizeof(char) * ((pos / BUFFER_SIZE) + 1) * BUFFER_SIZE);
     }
 

Modified: grass/trunk/lib/proj/get_proj.c
===================================================================
--- grass/trunk/lib/proj/get_proj.c	2014-04-13 18:57:15 UTC (rev 59714)
+++ grass/trunk/lib/proj/get_proj.c	2014-04-13 19:01:14 UTC (rev 59715)
@@ -232,7 +232,7 @@
 	    sprintf(err, " +%s", opt_in[i]);
 	    strcat(buffa, err);
 	}
-	G_warning(buffa);
+	G_warning("%s", buffa);
 	G_warning(_("The error message: %s"), pj_strerrno(pj_errno));
 	return -1;
     }

Modified: grass/trunk/lib/symbol/read.c
===================================================================
--- grass/trunk/lib/symbol/read.c	2014-04-13 18:57:15 UTC (rev 59714)
+++ grass/trunk/lib/symbol/read.c	2014-04-13 19:01:14 UTC (rev 59715)
@@ -221,7 +221,7 @@
 {
     fclose(fp);
     G_free(s);			/* TODO: free all */
-    G_warning(msg);
+    G_warning(msg, "%s");
     return NULL;
 }
 

Modified: grass/trunk/raster/r.out.ppm/main.c
===================================================================
--- grass/trunk/raster/r.out.ppm/main.c	2014-04-13 18:57:15 UTC (rev 59714)
+++ grass/trunk/raster/r.out.ppm/main.c	2014-04-13 19:01:14 UTC (rev 59715)
@@ -229,7 +229,7 @@
     fclose(fp);
 
     if (do_stdout)
-	G_done_msg("");
+	G_done_msg("%s", "");
     else
 	G_done_msg(_("File <%s> created"), ofile);
 

Modified: grass/trunk/raster/r.to.vect/areas_io.c
===================================================================
--- grass/trunk/raster/r.to.vect/areas_io.c	2014-04-13 18:57:15 UTC (rev 59714)
+++ grass/trunk/raster/r.to.vect/areas_io.c	2014-04-13 19:01:14 UTC (rev 59715)
@@ -371,7 +371,7 @@
 		}
 
 		db_append_string(&sql, ")");
-		G_debug(3, db_get_string(&sql));
+		G_debug(3, "%s", db_get_string(&sql));
 
 		if (db_execute_immediate(driver, &sql) != DB_OK)
 		    G_fatal_error(_("Cannot insert new row: %s"),

Modified: grass/trunk/vector/v.surf.rst/main.c
===================================================================
--- grass/trunk/vector/v.surf.rst/main.c	2014-04-13 18:57:15 UTC (rev 59714)
+++ grass/trunk/vector/v.surf.rst/main.c	2014-04-13 19:01:14 UTC (rev 59715)
@@ -818,12 +818,12 @@
     *tmpname = tmp = G_tempfile();
     fp = fopen(tmp, "w+");
     if (!fp)
-	G_fatal_error(_("Unable to open temporary file <%s>"), tmpname);
+	G_fatal_error(_("Unable to open temporary file <%s>"), *tmpname);
 
     for (i = 0; i < n_rows; i++) {
 	if (fwrite(zero_array_cell, sizeof(FCELL), n_cols, fp) != n_cols) {
 	    clean();
-	    G_fatal_error(_("Error writing temporary file <%s>"), tmpname);
+	    G_fatal_error(_("Error writing temporary file <%s>"), *tmpname);
 	}
     }
 

Modified: grass/trunk/vector/v.to.3d/trans3.c
===================================================================
--- grass/trunk/vector/v.to.3d/trans3.c	2014-04-13 18:57:15 UTC (rev 59714)
+++ grass/trunk/vector/v.to.3d/trans3.c	2014-04-13 19:01:14 UTC (rev 59715)
@@ -102,7 +102,7 @@
 	}
 	else if (Cats->n_cats > 1) {
 	    G_warning(_("Feature id %d has more categories. "
-			"Using category %d."), line, field, cat);
+			"Using category %d."), line, cat);
 	}
 
 	if (zcolumn && ltype == GV_POINT && cat > -1) {



More information about the grass-commit mailing list