diff options
author | Michael Natterer <mitch@imendio.com> | 2008-01-30 15:06:06 +0000 |
---|---|---|
committer | Michael Natterer <mitch@src.gnome.org> | 2008-01-30 15:06:06 +0000 |
commit | 63af2cd04130783a4e37ffe1599ee1c5ecef77a9 (patch) | |
tree | d2f63df124f1f3ef0e64ec75698008d97717c243 | |
parent | 8a1723bcccf32acb6659df620c157679af26dfde (diff) | |
download | gdk-pixbuf-63af2cd04130783a4e37ffe1599ee1c5ecef77a9.tar.gz |
use the right type for "subparser_data" and remove the (gpointer*) cast.
2008-01-30 Michael Natterer <mitch@imendio.com>
* gtk/gtkbuilderparser.c (parse_custom): use the right type for
"subparser_data" and remove the (gpointer*) cast. Fixes bogus
aliasing warning.
* gtk/updateiconcache.c (add_string): cast const gchar* to
gpointer when inserting in a GHashTable.
* tests/testcalendar.c (calendar_detail_cb): remove const from
return value since it's a newly allocated string.
(calendar_update_details): free the detail.
svn path=/trunk/; revision=19431
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | gtk/gtkbuilderparser.c | 4 | ||||
-rw-r--r-- | gtk/updateiconcache.c | 2 | ||||
-rw-r--r-- | tests/testcalendar.c | 6 |
4 files changed, 21 insertions, 5 deletions
@@ -1,3 +1,17 @@ +2008-01-30 Michael Natterer <mitch@imendio.com> + + * gtk/gtkbuilderparser.c (parse_custom): use the right type for + "subparser_data" and remove the (gpointer*) cast. Fixes bogus + aliasing warning. + + * gtk/updateiconcache.c (add_string): cast const gchar* to + gpointer when inserting in a GHashTable. + + * tests/testcalendar.c (calendar_detail_cb): remove const from + return value since it's a newly allocated string. + + (calendar_update_details): free the detail. + 2008-01-29 Johan Dahlin <johan@gnome.org> * demos/gtk-demo/builder.c: (quit_activate), (about_activate), diff --git a/gtk/gtkbuilderparser.c b/gtk/gtkbuilderparser.c index ce4b7dbc9..db3746723 100644 --- a/gtk/gtkbuilderparser.c +++ b/gtk/gtkbuilderparser.c @@ -636,7 +636,7 @@ parse_custom (GMarkupParseContext *context, { CommonInfo* parent_info; GMarkupParser parser; - gpointer *subparser_data; + gpointer subparser_data; GObject *object; GObject *child; @@ -671,7 +671,7 @@ parse_custom (GMarkupParseContext *context, child, element_name, &parser, - (gpointer*)&subparser_data)) + &subparser_data)) return FALSE; data->subparser = create_subparser (object, child, element_name, diff --git a/gtk/updateiconcache.c b/gtk/updateiconcache.c index 45d0cf00e..14462fb6f 100644 --- a/gtk/updateiconcache.c +++ b/gtk/updateiconcache.c @@ -744,7 +744,7 @@ find_string (const gchar *n) static void add_string (const gchar *n, int offset) { - g_hash_table_insert (string_pool, n, GINT_TO_POINTER (offset)); + g_hash_table_insert (string_pool, (gpointer) n, GINT_TO_POINTER (offset)); } static gboolean diff --git a/tests/testcalendar.c b/tests/testcalendar.c index 4e1bb8494..62423b1c9 100644 --- a/tests/testcalendar.c +++ b/tests/testcalendar.c @@ -105,7 +105,7 @@ static void calendar_update_details (CalendarData *data) { guint year, month, day; - const gchar *detail; + gchar *detail; gtk_calendar_get_date (GTK_CALENDAR (data->calendar_widget), &year, &month, &day); detail = calendar_get_detail (data, year, month, day); @@ -113,6 +113,8 @@ calendar_update_details (CalendarData *data) g_signal_handler_block (data->details_buffer, data->details_changed); gtk_text_buffer_set_text (data->details_buffer, detail ? detail : "", -1); g_signal_handler_unblock (data->details_buffer, data->details_changed); + + g_free (detail); } static void @@ -257,7 +259,7 @@ void calendar_select_font (GtkWidget *button, } } -static G_CONST_RETURN gchar* +static gchar* calendar_detail_cb (GtkCalendar *calendar, guint year, guint month, |