[GRASS-SVN] r61046 - grass/trunk/lib/nviz

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Jun 28 18:03:50 PDT 2014


Author: hcho
Date: 2014-06-28 18:03:50 -0700 (Sat, 28 Jun 2014)
New Revision: 61046

Modified:
   grass/trunk/lib/nviz/draw.c
   grass/trunk/lib/nviz/map_obj.c
Log:
libnviz: Fix uninitialized warning and invalid pointer conversion


Modified: grass/trunk/lib/nviz/draw.c
===================================================================
--- grass/trunk/lib/nviz/draw.c	2014-06-28 23:49:28 UTC (rev 61045)
+++ grass/trunk/lib/nviz/draw.c	2014-06-29 01:03:50 UTC (rev 61046)
@@ -246,7 +246,7 @@
     /* North Arrow */
     if (data->draw_arrow) {
 	gsd_north_arrow(data->arrow->where, data->arrow->size,
-			(GLuint)NULL, data->arrow->color, data->arrow->color);
+			0, data->arrow->color, data->arrow->color);
     }
 
     /* scale bar */

Modified: grass/trunk/lib/nviz/map_obj.c
===================================================================
--- grass/trunk/lib/nviz/map_obj.c	2014-06-28 23:49:28 UTC (rev 61045)
+++ grass/trunk/lib/nviz/map_obj.c	2014-06-29 01:03:50 UTC (rev 61046)
@@ -220,6 +220,8 @@
 	    else if (src == MAP_ATT) {
 		ret = GS_load_att_map(id, str_value, desc);
 	    }
+	    else
+		ret = -1;
 
 	    /* After we've loaded a constant map or a file,
 	     * may need to adjust resolution if we are resetting



More information about the grass-commit mailing list