]> Dogcows Code - chaz/openbox/commitdiff
avoid new gcc warning (casting ** to const** is not valid for good reason)
authorDana Jansens <danakj@orodu.net>
Mon, 17 May 2010 23:04:06 +0000 (19:04 -0400)
committerDana Jansens <danakj@orodu.net>
Mon, 17 May 2010 23:31:57 +0000 (19:31 -0400)
obt/prop.c
obt/prop.h
openbox/screen.c

index ae229e4295e82ed413394f2eac4f50f761ff0e3e..bef9c9996d4d091707d7cf9ed4b0016c6da7025d 100644 (file)
@@ -426,7 +426,8 @@ void obt_prop_set_string_locale(Window win, Atom prop, const gchar *val)
     obt_prop_set_strings_locale(win, prop, s);
 }
 
-void obt_prop_set_strings_locale(Window win, Atom prop, const gchar **strs)
+void obt_prop_set_strings_locale(Window win, Atom prop,
+                                 const gchar *const *strs)
 {
     gint i, count;
     gchar **lstrs;
@@ -456,10 +457,11 @@ void obt_prop_set_string_utf8(Window win, Atom prop, const gchar *val)
                     PropModeReplace, (const guchar*)val, strlen(val));
 }
 
-void obt_prop_set_strings_utf8(Window win, Atom prop, const gchar **strs)
+void obt_prop_set_strings_utf8(Window win, Atom prop,
+                               const gchar *const *strs)
 {
     GString *str;
-    gchar const **s;
+    gchar const *const *s;
 
     str = g_string_sized_new(0);
     for (s = strs; *s; ++s) {
index cc1fe736024ec662172319b93f4f1b36ef425e0c..7ccc218e195ab1d0a09debcc101b0746ddf610e8 100644 (file)
@@ -236,8 +236,10 @@ void obt_prop_set_array32(Window win, Atom prop, Atom type, gulong *val,
                           guint num);
 void obt_prop_set_string_locale(Window win, Atom prop, const gchar *val);
 void obt_prop_set_string_utf8(Window win, Atom prop, const gchar *val);
-void obt_prop_set_strings_locale(Window win, Atom prop, const gchar **strs);
-void obt_prop_set_strings_utf8(Window win, Atom prop, const gchar **strs);
+void obt_prop_set_strings_locale(Window win, Atom prop,
+                                 const gchar *const *strs);
+void obt_prop_set_strings_utf8(Window win, Atom prop,
+                               const gchar *const *strs);
 
 void obt_prop_erase(Window win, Atom prop);
 
index 4b91a6dd23f9812700adfe2152a55e4b968c34e1..47ecc18341364574800801f5d3e84779dafe0483 100644 (file)
@@ -396,7 +396,7 @@ void screen_startup(gboolean reconfig)
 
         /* set the root window property */
         OBT_PROP_SETSS(obt_root(ob_screen),
-                       NET_DESKTOP_NAMES, utf8, (const gchar**)names);
+                       NET_DESKTOP_NAMES, utf8, (const gchar*const*)names);
 
         g_strfreev(names);
     }
@@ -1206,7 +1206,7 @@ void screen_update_desktop_names(void)
         /* if we changed any names, then set the root property so we can
            all agree on the names */
         OBT_PROP_SETSS(obt_root(ob_screen), NET_DESKTOP_NAMES,
-                       utf8, (const gchar**)screen_desktop_names);
+                       utf8, (const gchar*const*)screen_desktop_names);
     }
 
     /* resize the pager for these names */
This page took 0.023002 seconds and 4 git commands to generate.