[GRASS-SVN] r36917 - grass/trunk/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Apr 30 03:36:22 EDT 2009


Author: glynn
Date: 2009-04-30 03:36:21 -0400 (Thu, 30 Apr 2009)
New Revision: 36917

Modified:
   grass/trunk/lib/gis/put_cellhd.c
   grass/trunk/lib/gis/quant_rw.c
   grass/trunk/lib/gis/range.c
Log:
Remove unused 'buf' variables


Modified: grass/trunk/lib/gis/put_cellhd.c
===================================================================
--- grass/trunk/lib/gis/put_cellhd.c	2009-04-29 22:04:29 UTC (rev 36916)
+++ grass/trunk/lib/gis/put_cellhd.c	2009-04-30 07:36:21 UTC (rev 36917)
@@ -21,9 +21,7 @@
     FILE *fd;
 
     if (!(fd = G_fopen_new("cellhd", name))) {
-	char buf[1024];
-
-	G_warning (_("Unable to create header file for [%s]"), name);
+	G_warning(_("Unable to create header file for [%s]"), name);
 	return -1;
     }
 

Modified: grass/trunk/lib/gis/quant_rw.c
===================================================================
--- grass/trunk/lib/gis/quant_rw.c	2009-04-29 22:04:29 UTC (rev 36916)
+++ grass/trunk/lib/gis/quant_rw.c	2009-04-30 07:36:21 UTC (rev 36917)
@@ -63,15 +63,14 @@
 
 int G_truncate_fp_map(const char *name, const char *mapset)
 {
-    char buf[300];
     struct Quant quant;
 
     G_quant_init(&quant);
     G_quant_truncate(&quant);
     /* quantize the map */
     if (G_write_quant(name, mapset, &quant) < 0) {
-	G_warning (_("G_truncate_fp_map: can't write quant rules"
-		     " for map %s"),
+	G_warning(_("G_truncate_fp_map: can't write quant rules"
+		    " for map %s"),
 		   name);
 	return -1;
     }
@@ -80,16 +79,15 @@
 
 int G_round_fp_map(const char *name, const char *mapset)
 {
-    char buf[300];
     struct Quant quant;
 
     G_quant_init(&quant);
     G_quant_round(&quant);
     /* round the map */
     if (G_write_quant(name, mapset, &quant) < 0) {
-	G_warning (_("G_truncate_fp_map: can't write quant rules"
-		     " for map %s"),
-		   name);
+	G_warning(_("G_truncate_fp_map: can't write quant rules"
+		    " for map %s"),
+		  name);
 	return -1;
     }
     return 1;
@@ -113,19 +111,18 @@
 int G_quantize_fp_map(const char *name, const char *mapset,
 		      CELL min, CELL max)
 {
-    char buf[300];
     DCELL d_min, d_max;
     struct FPRange fp_range;
 
     if (G_read_fp_range(name, mapset, &fp_range) < 0) {
-	G_warning (_("G_quantize_fp_map: can't read fp range for map %s"),
-		   name);
+	G_warning(_("G_quantize_fp_map: can't read fp range for map %s"),
+		  name);
 	return -1;
     }
     G_get_fp_range_min_max(&fp_range, &d_min, &d_max);
     if (G_is_d_null_value(&d_min) || G_is_d_null_value(&d_max)) {
-	G_warning (_("G_quantize_fp_map: raster map %s is empty"),
-		   name);
+	G_warning(_("G_quantize_fp_map: raster map %s is empty"),
+		  name);
 	return -1;
     }
     return G_quantize_fp_map_range(name, mapset, d_min, d_max, min, max);
@@ -158,16 +155,15 @@
 int G_quantize_fp_map_range(const char *name, const char *mapset,
 			    DCELL d_min, DCELL d_max, CELL min, CELL max)
 {
-    char buf[300];
     struct Quant quant;
 
     G_quant_init(&quant);
     G_quant_add_rule(&quant, d_min, d_max, min, max);
     /* quantize the map */
     if (G_write_quant(name, mapset, &quant) < 0) {
-	G_warning (_("G_quantize_fp_map_range: can't write quant rules"
-		     " for map %s"),
-		   name);
+	G_warning(_("G_quantize_fp_map_range: can't write quant rules"
+		    " for map %s"),
+		  name);
 	return -1;
     }
     return 1;
@@ -198,11 +194,10 @@
 {
     CELL cell_min, cell_max;
     DCELL d_min, d_max;
-    char buf[300];
 
     if (G_raster_map_type(name, mapset) == CELL_TYPE) {
-	G_warning (_("Cannot write quant rules: map %s is integer"),
-		   name);
+	G_warning(_("Cannot write quant rules: map %s is integer"),
+		  name);
 	return -1;
     }
 

Modified: grass/trunk/lib/gis/range.c
===================================================================
--- grass/trunk/lib/gis/range.c	2009-04-29 22:04:29 UTC (rev 36916)
+++ grass/trunk/lib/gis/range.c	2009-04-30 07:36:21 UTC (rev 36917)
@@ -137,7 +137,7 @@
 {
     struct Range range;
     int fd;
-    char buf[200], xdr_buf[100];
+    char xdr_buf[100];
     DCELL dcell1, dcell2;
     XDR xdr_str;
 
@@ -185,8 +185,8 @@
   error:
     if (fd > 0)
 	close(fd);
-    G_warning (_("can't read f_range file for [%s in %s]"),
-	       name, mapset);
+    G_warning(_("can't read f_range file for [%s in %s]"),
+	      name, mapset);
     return -1;
 }
 
@@ -236,8 +236,8 @@
 	DCELL dmin, dmax;
 
 	if (G_read_quant(name, mapset, &quant) < 0) {
-	    G_warning (_("G_read_range(): can't read quant rules"
-			 " for fp map %s@%s"),
+	    G_warning(_("G_read_range(): can't read quant rules"
+			" for fp map %s@%s"),
 		       name, mapset);
 	    return -1;
 	}
@@ -300,8 +300,8 @@
   error:
     if (fd)
 	fclose(fd);
-    G_warning (_("can't read range file for [%s in %s]"),
-	       name, mapset);
+    G_warning(_("can't read range file for [%s in %s]"),
+	      name, mapset);
     return -1;
 }
 



More information about the grass-commit mailing list