Fix compiler warnings
authorAndy Spencer <andy753421@gmail.com>
Mon, 10 May 2010 05:34:23 +0000 (05:34 +0000)
committerAndy Spencer <andy753421@gmail.com>
Mon, 10 May 2010 05:34:23 +0000 (05:34 +0000)
gen.sh
src/gis-opengl.c
src/gis-viewer.c
src/plugins/elev.c
src/plugins/map.c
src/plugins/sat.c
src/roam.c

diff --git a/gen.sh b/gen.sh
index 2cbbd0d..adbf6e2 100755 (executable)
--- a/gen.sh
+++ b/gen.sh
@@ -4,5 +4,5 @@ dir=$(dirname $(readlink -f $0))
        "--enable-gtk-doc" \
        "--libdir=$dir/src/.libs" \
        "--includedir=$dir/include" \
-       CFLAGS="-g -Werror -Wno-unused $CFLAGS" \
+       CFLAGS="-g -Werror $CFLAGS" \
        LDFLAGS="-Wl,-z,defs"
index 11c489b..ecbf47a 100644 (file)
@@ -548,7 +548,6 @@ GisViewer *gis_opengl_new(GisPlugins *plugins, GisPrefs *prefs)
 
 static void gis_opengl_center_position(GisViewer *_opengl, gdouble lat, gdouble lon, gdouble elev)
 {
-       GisOpenGL *opengl = GIS_OPENGL(_opengl);
        glRotatef(lon, 0, 1, 0);
        glRotatef(-lat, 1, 0, 0);
        glTranslatef(0, 0, elev2rad(elev));
index b89c37f..8679ff9 100644 (file)
@@ -142,7 +142,7 @@ static gboolean on_button_press(GisViewer *viewer, GdkEventButton *event, gpoint
        case 1:  viewer->drag_mode = GIS_DRAG_PAN;  break;
        case 2:  viewer->drag_mode = GIS_DRAG_ZOOM; break;
        case 3:  viewer->drag_mode = GIS_DRAG_TILT; break;
-       defualt: viewer->drag_mode = GIS_DRAG_NONE; break;
+       default: viewer->drag_mode = GIS_DRAG_NONE; break;
        }
        viewer->drag_x = event->x;
        viewer->drag_y = event->y;
@@ -585,7 +585,6 @@ static void gis_viewer_init(GisViewer *viewer)
 static void gis_viewer_finalize(GObject *gobject)
 {
        g_debug("GisViewer: finalize");
-       GisViewer *viewer = GIS_VIEWER(gobject);
        G_OBJECT_CLASS(gis_viewer_parent_class)->finalize(gobject);
 }
 static void gis_viewer_class_init(GisViewerClass *klass)
index a8f9df1..a6589ff 100644 (file)
@@ -237,7 +237,6 @@ static gboolean _free_tile_cb(gpointer _data)
 }
 static void _free_tile(GisTile *tile, gpointer _elev)
 {
-       GisPluginElev *elev = _elev;
        g_debug("GisPluginElev: _free_tile: %p", tile->data);
        if (tile->data)
                g_idle_add_full(G_PRIORITY_LOW, _free_tile_cb, tile->data, NULL);
index 5799ca0..d93e336 100644 (file)
@@ -128,7 +128,6 @@ static gboolean _free_tile_cb(gpointer data)
 }
 static void _free_tile(GisTile *tile, gpointer _map)
 {
-       GisPluginMap *map = _map;
        g_debug("GisPluginMap: _free_tile: %p", tile->data);
        if (tile->data)
                g_idle_add_full(G_PRIORITY_LOW, _free_tile_cb, tile->data, NULL);
index 2d28da5..1e61f1d 100644 (file)
@@ -118,7 +118,6 @@ static gboolean _free_tile_cb(gpointer data)
 }
 static void _free_tile(GisTile *tile, gpointer _sat)
 {
-       GisPluginSat *sat = _sat;
        g_debug("GisPluginSat: _free_tile: %p", tile->data);
        if (tile->data)
                g_idle_add_full(G_PRIORITY_LOW, _free_tile_cb, tile->data, NULL);
index 3de5b5b..6694026 100644 (file)
@@ -84,13 +84,6 @@ RoamPoint *roam_point_new(gdouble lat, gdouble lon, gdouble elev)
        return point;
 }
 
-static RoamPoint *roam_point_dup(RoamPoint *point)
-{
-       RoamPoint *new = g_memdup(point, sizeof(RoamPoint));
-       new->tris = 0;
-       return new;
-}
-
 /**
  * roam_point_add_triangle:
  * @point:    the point