[GRASS-SVN] r68868 - grass/trunk/raster/r.what

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Jul 6 12:19:09 PDT 2016


Author: neteler
Date: 2016-07-06 12:19:09 -0700 (Wed, 06 Jul 2016)
New Revision: 68868

Modified:
   grass/trunk/raster/r.what/main.c
Log:
r.what: do not shadow same variable name (gcc flag -Wshadow)

Modified: grass/trunk/raster/r.what/main.c
===================================================================
--- grass/trunk/raster/r.what/main.c	2016-07-06 18:55:44 UTC (rev 68867)
+++ grass/trunk/raster/r.what/main.c	2016-07-06 19:19:09 UTC (rev 68868)
@@ -51,7 +51,7 @@
 {
     int i, j;
     int nfiles;
-    char *name;
+    char *oname;
     int fd[NFILES];
     struct Categories cats[NFILES];
     struct Cell_head window;
@@ -164,10 +164,10 @@
     if (G_parser(argc, argv))
 	exit(EXIT_FAILURE);
 
-    name = opt.output->answer;
-    if (name != NULL && strcmp(name, "-") != 0) {
-	if (NULL == freopen(name, "w", stdout)) {
-	    G_fatal_error(_("Unable to open file <%s> for writing"), name);
+    oname = opt.output->answer;
+    if (oname != NULL && strcmp(oname, "-") != 0) {
+	if (NULL == freopen(oname, "w", stdout)) {
+	    G_fatal_error(_("Unable to open file <%s> for writing"), oname);
 	}
     }
 



More information about the grass-commit mailing list