[GRASS-SVN] r74332 - grass/trunk/misc/m.nviz.image
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Apr 1 12:32:42 PDT 2019
Author: mmetz
Date: 2019-04-01 12:32:42 -0700 (Mon, 01 Apr 2019)
New Revision: 74332
Modified:
grass/trunk/misc/m.nviz.image/surface.c
grass/trunk/misc/m.nviz.image/volume.c
Log:
m.nviz.image: fix compiler warnings + coverity scan
Modified: grass/trunk/misc/m.nviz.image/surface.c
===================================================================
--- grass/trunk/misc/m.nviz.image/surface.c 2019-04-01 14:04:24 UTC (rev 74331)
+++ grass/trunk/misc/m.nviz.image/surface.c 2019-04-01 19:32:42 UTC (rev 74332)
@@ -99,15 +99,14 @@
for (i = 0; i < nsurfs; i++) {
id = surf_list[i];
+ mapset = G_find_raster2(params->color_map->answers[i], "");
+ if (mapset == NULL) {
+ G_fatal_error(_("Raster map <%s> not found"),
+ params->color_map->answers[i]);
+ }
/* color */
/* check for color map */
if (i < ncolor_map && strcmp(params->color_map->answers[i], "")) {
- mapset = G_find_raster2(params->color_map->answers[i], "");
- if (mapset == NULL) {
- G_fatal_error(_("Raster map <%s> not found"),
- params->color_map->answers[i]);
- }
-
Nviz_set_attr(id, MAP_OBJ_SURF, ATT_COLOR, MAP_ATT,
G_fully_qualified_name(params->
color_map->answers[i],
Modified: grass/trunk/misc/m.nviz.image/volume.c
===================================================================
--- grass/trunk/misc/m.nviz.image/volume.c 2019-04-01 14:04:24 UTC (rev 74331)
+++ grass/trunk/misc/m.nviz.image/volume.c 2019-04-01 19:32:42 UTC (rev 74332)
@@ -32,7 +32,7 @@
{
int i, nvol, id;
float x, y, z;
- char *mapset;
+ const char *mapset;
nvol = opt_get_num_answers(params->volume);
More information about the grass-commit
mailing list