diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c
index b39ad2c..d4f336b 100644
--- a/gtk/gtkimage.c
+++ b/gtk/gtkimage.c
@@ -1575,7 +1575,6 @@ ensure_pixbuf_for_gicon (GtkImage *image)
   GtkIconTheme *icon_theme;
   GtkSettings *settings;
   gint width, height;
-  gint *sizes, *s, dist;
   GError *error = NULL;
   GtkIconInfo *info;
 
@@ -1951,6 +1950,7 @@ gtk_image_expose (GtkWidget      *widget,
                 case GTK_IMAGE_ANIMATION:
 		case GTK_IMAGE_ICON_NAME:
                 case GTK_IMAGE_EMPTY:
+		case GTK_IMAGE_GICON:
                   g_assert_not_reached ();
                   break;
                 }
