diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2004-10-28 15:00:05 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2004-10-28 15:00:05 +0000 |
commit | d5f92150d4b8bffb78cd5110cbb2c28bfdf81136 (patch) | |
tree | 0d79978a95c24dcbdb2d9fd577dedf0da2795ece /tests | |
parent | dbba41045ecb383810fb8962ee9b83998a89c37d (diff) | |
download | gtk+-d5f92150d4b8bffb78cd5110cbb2c28bfdf81136.tar.gz |
Fix many sparse warnings.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/testcalendar.c | 4 | ||||
-rw-r--r-- | tests/testcombo.c | 10 | ||||
-rw-r--r-- | tests/testcombochange.c | 10 | ||||
-rw-r--r-- | tests/testdnd.c | 2 | ||||
-rw-r--r-- | tests/testentrycompletion.c | 4 | ||||
-rw-r--r-- | tests/testgtk.c | 6 | ||||
-rw-r--r-- | tests/testiconview.c | 2 | ||||
-rw-r--r-- | tests/testmerge.c | 6 | ||||
-rw-r--r-- | tests/testselection.c | 66 | ||||
-rw-r--r-- | tests/testsocket.c | 2 | ||||
-rw-r--r-- | tests/testsocket_common.c | 2 | ||||
-rw-r--r-- | tests/testtext.c | 22 |
12 files changed, 68 insertions, 68 deletions
diff --git a/tests/testcalendar.c b/tests/testcalendar.c index 618de95d1e..0ab4409eed 100644 --- a/tests/testcalendar.c +++ b/tests/testcalendar.c @@ -163,7 +163,7 @@ void calendar_set_flags( CalendarData *calendar ) options=options + (1<<i); } if (calendar->window) - gtk_calendar_display_options (GTK_CALENDAR (calendar->window), options); + gtk_calendar_set_display_options (GTK_CALENDAR (calendar->window), options); } void calendar_toggle_flag( GtkWidget *toggle, @@ -234,7 +234,7 @@ void calendar_select_font( GtkWidget *button, } -void create_calendar() +void create_calendar(void) { GtkWidget *window; GtkWidget *vbox, *vbox2, *vbox3; diff --git a/tests/testcombo.c b/tests/testcombo.c index f2b7c7401d..232b4372c1 100644 --- a/tests/testcombo.c +++ b/tests/testcombo.c @@ -44,7 +44,7 @@ create_color_pixbuf (const char *color) } static GtkWidget * -create_combo_box_grid_demo () +create_combo_box_grid_demo (void) { GtkWidget *combo; GtkTreeIter iter; @@ -118,7 +118,7 @@ create_combo_box_grid_demo () /* blaat */ static GtkTreeModel * -create_tree_blaat () +create_tree_blaat (void) { GdkPixbuf *pixbuf; GtkWidget *cellview; @@ -189,7 +189,7 @@ create_tree_blaat () } static GtkTreeModel * -create_list_blaat () +create_list_blaat (void) { GdkPixbuf *pixbuf; GtkWidget *cellview; @@ -253,7 +253,7 @@ create_list_blaat () /* blaat */ static GtkTreeModel * -create_phylogenetic_tree () +create_phylogenetic_tree (void) { GtkTreeIter iter, iter2, iter3; GtkTreeStore *store; @@ -506,7 +506,7 @@ create_phylogenetic_tree () /* blaat */ static GtkTreeModel * -create_capital_tree () +create_capital_tree (void) { GtkTreeIter iter, iter2; GtkTreeStore *store; diff --git a/tests/testcombochange.c b/tests/testcombochange.c index f673a40669..a58efda26f 100644 --- a/tests/testcombochange.c +++ b/tests/testcombochange.c @@ -9,7 +9,7 @@ GArray *contents; static char next_value = 'A'; static void -test_init () +test_init (void) { if (g_file_test ("../gdk-pixbuf/libpixbufloader-pnm.la", G_FILE_TEST_EXISTS)) @@ -20,7 +20,7 @@ test_init () } static void -log (const char *fmt, +combochange_log (const char *fmt, ...) { GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_view)); @@ -120,7 +120,7 @@ on_insert (void) g_array_insert_val (contents, insert_pos, new_value); - log ("Inserted '%c' at position %d", new_value[0], insert_pos); + combochange_log ("Inserted '%c' at position %d", new_value[0], insert_pos); } static void @@ -141,7 +141,7 @@ on_delete (void) old_val = g_array_index (contents, char, delete_pos); g_array_remove_index (contents, delete_pos); - log ("Deleted '%c' from position %d", old_val, delete_pos); + combochange_log ("Deleted '%c' from position %d", old_val, delete_pos); } static void @@ -175,7 +175,7 @@ on_reorder (void) g_array_free (contents, TRUE); contents = new_contents; - log ("Reordered array"); + combochange_log ("Reordered array"); g_free (shuffle_array); } diff --git a/tests/testdnd.c b/tests/testdnd.c index 55d50f16a4..a3904ae9b1 100644 --- a/tests/testdnd.c +++ b/tests/testdnd.c @@ -556,7 +556,7 @@ source_drag_data_delete (GtkWidget *widget, } void -test_init () +test_init (void) { if (g_file_test ("../gdk-pixbuf/libpixbufloader-pnm.la", G_FILE_TEST_EXISTS)) diff --git a/tests/testentrycompletion.c b/tests/testentrycompletion.c index 01bd203309..0f7a74f761 100644 --- a/tests/testentrycompletion.c +++ b/tests/testentrycompletion.c @@ -217,7 +217,7 @@ animation_timer (GtkEntryCompletion *completion) { g_print ("readding model!\n"); - gtk_entry_completion_set_model (completion, old_store); + gtk_entry_completion_set_model (completion, GTK_TREE_MODEL(old_store)); g_object_unref (old_store); old_store = NULL; } @@ -342,7 +342,7 @@ main (int argc, char *argv[]) gtk_entry_completion_insert_action_text (completion, 100, "action!"); gtk_entry_completion_insert_action_text (completion, 101, "'nother action!"); - g_signal_connect (completion, "action_activated", G_CALLBACK (activated_cb), 0); + g_signal_connect (completion, "action_activated", G_CALLBACK (activated_cb), NULL); /* Create our third entry */ entry = gtk_entry_new (); diff --git a/tests/testgtk.c b/tests/testgtk.c index fb0e54409e..0ca5a617c8 100644 --- a/tests/testgtk.c +++ b/tests/testgtk.c @@ -3931,7 +3931,7 @@ dump_accels (gpointer callback_data, static GtkItemFactoryEntry menu_items[] = { - { "/_File", NULL, 0, 0, "<Branch>" }, + { "/_File", NULL, NULL, 0, "<Branch>" }, { "/File/tearoff1", NULL, gtk_ifactory_cb, 0, "<Tearoff>" }, { "/File/_New", NULL, gtk_ifactory_cb, 0, "<StockItem>", GTK_STOCK_NEW }, { "/File/_Open", NULL, gtk_ifactory_cb, 0, "<StockItem>", GTK_STOCK_OPEN }, @@ -7537,7 +7537,7 @@ create_flipping (GtkWidget *widget) gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check_button), TRUE); g_signal_connect (check_button, "toggled", - G_CALLBACK (flipping_toggled_cb), FALSE); + G_CALLBACK (flipping_toggled_cb), NULL); gtk_container_set_border_width (GTK_CONTAINER (check_button), 10); @@ -12794,7 +12794,7 @@ create_main_window (void) } static void -test_init () +test_init (void) { if (g_file_test ("../gdk-pixbuf/libpixbufloader-pnm.la", G_FILE_TEST_EXISTS)) diff --git a/tests/testiconview.c b/tests/testiconview.c index 4463367271..142307db33 100644 --- a/tests/testiconview.c +++ b/tests/testiconview.c @@ -201,7 +201,7 @@ do_popup_menu (GtkWidget *icon_list, data = g_new0 (ItemData, 1); data->icon_list = GTK_ICON_VIEW (icon_list); data->path = path; - g_object_set_data_full (G_OBJECT (menu), "item-path", data, free_item_data); + g_object_set_data_full (G_OBJECT (menu), "item-path", data, (GDestroyNotify)free_item_data); menuitem = gtk_menu_item_new_with_label ("Activate"); gtk_widget_show (menuitem); diff --git a/tests/testmerge.c b/tests/testmerge.c index dff451a648..8ca7ca7cee 100644 --- a/tests/testmerge.c +++ b/tests/testmerge.c @@ -121,7 +121,7 @@ static void toggle_dynamic (GtkWidget *button, GtkUIManager *merge) { - g_timeout_add (2000, delayed_toggle_dynamic, merge); + g_timeout_add (2000, (GSourceFunc)delayed_toggle_dynamic, merge); } static void @@ -557,8 +557,8 @@ connect_proxy (GtkUIManager *merge, g_object_set_data_full (G_OBJECT (proxy), "action-status", data, action_status_destroy); - g_signal_connect (proxy, "select", G_CALLBACK (set_tip), 0); - g_signal_connect (proxy, "deselect", G_CALLBACK (unset_tip), 0); + g_signal_connect (proxy, "select", G_CALLBACK (set_tip), NULL); + g_signal_connect (proxy, "deselect", G_CALLBACK (unset_tip), NULL); } } } diff --git a/tests/testselection.c b/tests/testselection.c index c430073b68..53935b580a 100644 --- a/tests/testselection.c +++ b/tests/testselection.c @@ -65,43 +65,43 @@ typedef struct _Target { in the ICCCM */ static Target targets[] = { - { "ADOBE_PORTABLE_DOCUMENT_FORMAT", STRING, 0, 8 }, - { "APPLE_PICT", APPLE_PICT, 0, 8 }, - { "BACKGROUND", PIXEL, 0, 32 }, - { "BITMAP", BITMAP, 0, 32 }, - { "CHARACTER_POSITION", SPAN, 0, 32 }, - { "CLASS", TEXT, 0, 8 }, - { "CLIENT_WINDOW", WINDOW, 0, 32 }, - { "COLORMAP", COLORMAP, 0, 32 }, - { "COLUMN_NUMBER", SPAN, 0, 32 }, - { "COMPOUND_TEXT", COMPOUND_TEXT, 0, 8 }, + { "ADOBE_PORTABLE_DOCUMENT_FORMAT", STRING, NULL, 8 }, + { "APPLE_PICT", APPLE_PICT, NULL, 8 }, + { "BACKGROUND", PIXEL, NULL, 32 }, + { "BITMAP", BITMAP, NULL, 32 }, + { "CHARACTER_POSITION", SPAN, NULL, 32 }, + { "CLASS", TEXT, NULL, 8 }, + { "CLIENT_WINDOW", WINDOW, NULL, 32 }, + { "COLORMAP", COLORMAP, NULL, 32 }, + { "COLUMN_NUMBER", SPAN, NULL, 32 }, + { "COMPOUND_TEXT", COMPOUND_TEXT, NULL, 8 }, /* { "DELETE", "NULL", 0, ? }, */ - { "DRAWABLE", DRAWABLE, 0, 32 }, - { "ENCAPSULATED_POSTSCRIPT", STRING, 0, 8 }, - { "ENCAPSULATED_POSTSCRIPT_INTERCHANGE", STRING, 0, 8 }, - { "FILE_NAME", TEXT, 0, 8 }, - { "FOREGROUND", PIXEL, 0, 32 }, - { "HOST_NAME", TEXT, 0, 8 }, + { "DRAWABLE", DRAWABLE, NULL, 32 }, + { "ENCAPSULATED_POSTSCRIPT", STRING, NULL, 8 }, + { "ENCAPSULATED_POSTSCRIPT_INTERCHANGE", STRING, NULL, 8 }, + { "FILE_NAME", TEXT, NULL, 8 }, + { "FOREGROUND", PIXEL, NULL, 32 }, + { "HOST_NAME", TEXT, NULL, 8 }, /* { "INSERT_PROPERTY", "NULL", 0, ? NULL }, */ /* { "INSERT_SELECTION", "NULL", 0, ? NULL }, */ - { "LENGTH", INTEGER, 0, 32 }, - { "LINE_NUMBER", SPAN, 0, 32 }, - { "LIST_LENGTH", INTEGER, 0, 32 }, - { "MODULE", TEXT, 0, 8 }, + { "LENGTH", INTEGER, NULL, 32 }, + { "LINE_NUMBER", SPAN, NULL, 32 }, + { "LIST_LENGTH", INTEGER, NULL, 32 }, + { "MODULE", TEXT, NULL, 8 }, /* { "MULTIPLE", "ATOM_PAIR", 0, 32 }, */ - { "NAME", TEXT, 0, 8 }, - { "ODIF", TEXT, 0, 8 }, - { "OWNER_OS", TEXT, 0, 8 }, - { "PIXMAP", PIXMAP, 0, 32 }, - { "POSTSCRIPT", STRING, 0, 8 }, - { "PROCEDURE", TEXT, 0, 8 }, - { "PROCESS", INTEGER, 0, 32 }, - { "STRING", STRING, 0, 8 }, - { "TARGETS", ATOM, 0, 32 }, - { "TASK", INTEGER, 0, 32 }, - { "TEXT", TEXT, 0, 8 }, - { "TIMESTAMP", INTEGER, 0, 32 }, - { "USER", TEXT, 0, 8 }, + { "NAME", TEXT, NULL, 8 }, + { "ODIF", TEXT, NULL, 8 }, + { "OWNER_OS", TEXT, NULL, 8 }, + { "PIXMAP", PIXMAP, NULL, 32 }, + { "POSTSCRIPT", STRING, NULL, 8 }, + { "PROCEDURE", TEXT, NULL, 8 }, + { "PROCESS", INTEGER, NULL, 32 }, + { "STRING", STRING, NULL, 8 }, + { "TARGETS", ATOM, NULL, 32 }, + { "TASK", INTEGER, NULL, 32 }, + { "TEXT", TEXT, NULL, 8 }, + { "TIMESTAMP", INTEGER, NULL, 32 }, + { "USER", TEXT, NULL, 8 }, }; static int num_targets = sizeof(targets)/sizeof(Target); diff --git a/tests/testsocket.c b/tests/testsocket.c index 682a3354cd..41e8276730 100644 --- a/tests/testsocket.c +++ b/tests/testsocket.c @@ -43,7 +43,7 @@ quit_cb (gpointer callback_data, static GtkItemFactoryEntry menu_items[] = { - { "/_File", NULL, 0, 0, "<Branch>" }, + { "/_File", NULL, NULL, 0, "<Branch>" }, { "/File/_Quit", "<control>Q", quit_cb, 0 }, }; diff --git a/tests/testsocket_common.c b/tests/testsocket_common.c index 9fc246c43b..1783a65a81 100644 --- a/tests/testsocket_common.c +++ b/tests/testsocket_common.c @@ -60,7 +60,7 @@ blink_cb (gpointer data) GtkWidget *widget = data; gtk_widget_show (widget); - g_object_set_data (G_OBJECT (widget), "blink", GPOINTER_TO_UINT (0)); + g_object_set_data (G_OBJECT (widget), "blink", NULL); return FALSE; } diff --git a/tests/testtext.c b/tests/testtext.c index 9aa6572d26..80fc9bbb6b 100644 --- a/tests/testtext.c +++ b/tests/testtext.c @@ -1499,42 +1499,42 @@ view_init_menus (View *view) static GtkItemFactoryEntry menu_items[] = { - { "/_File", NULL, 0, 0, "<Branch>" }, + { "/_File", NULL, NULL, 0, "<Branch>" }, { "/File/_New", "<control>N", do_new, 0, NULL }, { "/File/New _View", NULL, do_new_view, 0, NULL }, { "/File/_Open", "<control>O", do_open, 0, NULL }, { "/File/_Save", "<control>S", do_save, 0, NULL }, { "/File/Save _As...", NULL, do_save_as, 0, NULL }, - { "/File/sep1", NULL, 0, 0, "<Separator>" }, + { "/File/sep1", NULL, NULL, 0, "<Separator>" }, { "/File/_Close", "<control>W" , do_close, 0, NULL }, { "/File/E_xit", "<control>Q" , do_exit, 0, NULL }, { "/_Edit", NULL, 0, 0, "<Branch>" }, { "/Edit/Find...", NULL, do_search, 0, NULL }, - { "/_Settings", NULL, 0, 0, "<Branch>" }, + { "/_Settings", NULL, NULL, 0, "<Branch>" }, { "/Settings/Wrap _Off", NULL, do_wrap_changed, GTK_WRAP_NONE, "<RadioItem>" }, { "/Settings/Wrap _Words", NULL, do_wrap_changed, GTK_WRAP_WORD, "/Settings/Wrap Off" }, { "/Settings/Wrap _Chars", NULL, do_wrap_changed, GTK_WRAP_CHAR, "/Settings/Wrap Off" }, - { "/Settings/sep1", NULL, 0, 0, "<Separator>" }, + { "/Settings/sep1", NULL, NULL, 0, "<Separator>" }, { "/Settings/Editable", NULL, do_editable_changed, TRUE, "<RadioItem>" }, { "/Settings/Not editable", NULL, do_editable_changed, FALSE, "/Settings/Editable" }, - { "/Settings/sep1", NULL, 0, 0, "<Separator>" }, + { "/Settings/sep1", NULL, NULL, 0, "<Separator>" }, { "/Settings/Cursor visible", NULL, do_cursor_visible_changed, TRUE, "<RadioItem>" }, { "/Settings/Cursor not visible", NULL, do_cursor_visible_changed, FALSE, "/Settings/Cursor visible" }, - { "/Settings/sep1", NULL, 0, 0, "<Separator>" }, + { "/Settings/sep1", NULL, NULL, 0, "<Separator>" }, { "/Settings/Left-to-Right", NULL, do_direction_changed, GTK_TEXT_DIR_LTR, "<RadioItem>" }, { "/Settings/Right-to-Left", NULL, do_direction_changed, GTK_TEXT_DIR_RTL, "/Settings/Left-to-Right" }, - { "/Settings/sep1", NULL, 0, 0, "<Separator>" }, + { "/Settings/sep1", NULL, NULL, 0, "<Separator>" }, { "/Settings/Sane spacing", NULL, do_spacing_changed, FALSE, "<RadioItem>" }, { "/Settings/Funky spacing", NULL, do_spacing_changed, TRUE, "/Settings/Sane spacing" }, - { "/Settings/sep1", NULL, 0, 0, "<Separator>" }, + { "/Settings/sep1", NULL, NULL, 0, "<Separator>" }, { "/Settings/Don't cycle color tags", NULL, do_color_cycle_changed, FALSE, "<RadioItem>" }, { "/Settings/Cycle colors", NULL, do_color_cycle_changed, TRUE, "/Settings/Don't cycle color tags" }, - { "/_Attributes", NULL, 0, 0, "<Branch>" }, + { "/_Attributes", NULL, NULL, 0, "<Branch>" }, { "/Attributes/Editable", NULL, do_apply_editable, TRUE, NULL }, { "/Attributes/Not editable", NULL, do_apply_editable, FALSE, NULL }, { "/Attributes/Invisible", NULL, do_apply_invisible, FALSE, NULL }, @@ -1545,7 +1545,7 @@ static GtkItemFactoryEntry menu_items[] = { "/Attributes/No colors", NULL, do_apply_colors, FALSE, NULL }, { "/Attributes/Remove all tags", NULL, do_remove_tags, 0, NULL }, { "/Attributes/Properties", NULL, do_properties, 0, NULL }, - { "/_Test", NULL, 0, 0, "<Branch>" }, + { "/_Test", NULL, NULL, 0, "<Branch>" }, { "/Test/_Example", NULL, do_example, 0, NULL }, { "/Test/_Insert and scroll", NULL, do_insert_and_scroll, 0, NULL }, { "/Test/_Add fixed children", NULL, do_add_children, 0, NULL }, @@ -2542,7 +2542,7 @@ view_add_example_widgets (View *view) } void -test_init () +test_init (void) { if (g_file_test ("../gdk-pixbuf/libpixbufloader-pnm.la", G_FILE_TEST_EXISTS)) |