[gtk+/gtk-2-24] iconfactory: Silence gcc warning



commit adfcc91be673df9ea1368b4d64e19a7a1969edb9
Author: Benjamin Otte <otte redhat com>
Date:   Wed Nov 17 06:21:06 2010 +0100

    iconfactory: Silence gcc warning

 gtk/gtkiconfactory.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkiconfactory.c b/gtk/gtkiconfactory.c
index 9cbc391..0b93b21 100644
--- a/gtk/gtkiconfactory.c
+++ b/gtk/gtkiconfactory.c
@@ -1445,17 +1445,19 @@ render_icon_name_pixbuf (GtkIconSource    *icon_source,
   if (icon_source->direction != GTK_TEXT_DIR_NONE)
     {
       gchar *suffix[3] = { NULL, "-ltr", "-rtl" };
-      gchar *names[3];
+      const gchar *names[3];
+      gchar *name_with_dir;
       GtkIconInfo *info;
 
-      names[0] = g_strconcat (icon_source->source.icon_name, suffix[icon_source->direction], NULL);
+      name_with_dir = g_strconcat (icon_source->source.icon_name, suffix[icon_source->direction], NULL);
+      names[0] = name_with_dir;
       names[1] = icon_source->source.icon_name;
       names[2] = NULL;
 
       info = gtk_icon_theme_choose_icon (icon_theme,
-                                               names,
-                                               pixel_size, GTK_ICON_LOOKUP_USE_BUILTIN);
-      g_free (names[0]);
+                                         names,
+                                         pixel_size, GTK_ICON_LOOKUP_USE_BUILTIN);
+      g_free (name_with_dir);
       if (info)
         {
           tmp_pixbuf = gtk_icon_info_load_icon (info, &error);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]