Fix some compiler warnings. (#433642, Kjartan Maraas)

2007-04-30  Matthias Clasen  <mclasen@redhat.com>

        Fix some compiler warnings.  (#433642, Kjartan Maraas)

        * gtk/gtkfilesystemwin32.c (gtk_file_system_win32_get_info):
        (gtk_file_system_win32_create_folder):
        * gtk/gtkaction.c (gtk_action_create_menu): Fix NULL/FALSE confusion.

        * gtk/gtklinkbutton.c (gtk_link_button_clicked): Pass
        the right type to uri_func.

        * gtk/gtktext.c (gtk_text_key_press):
        * gtk/gtkstatusicon.c (gtk_status_icon_get_property):
        * gtk/gtkxembed.c (_gtk_xembed_send_message): Add casts.

        * gtk/gtktrayicon-x11.c (gtk_tray_icon_manager_window_destroyed):
        (gtk_tray_icon_delete):
        * gtk/gtkprintunixdialog.c (create_main_page):
        * gtk/gtkhsv.c (gtk_hsv_motion): Remove unused variables.

        * gtk/gtkliststore.c: Adapt callbacks to GSequence types.


svn path=/trunk/; revision=17739
This commit is contained in:
Matthias Clasen 2007-04-30 16:18:54 +00:00 committed by Matthias Clasen
parent c75e9c1df7
commit 6573ed5f12
11 changed files with 38 additions and 19 deletions

View File

@ -1,3 +1,25 @@
2007-04-30 Matthias Clasen <mclasen@redhat.com>
Fix some compiler warnings. (#433642, Kjartan Maraas)
* gtk/gtkfilesystemwin32.c (gtk_file_system_win32_get_info):
(gtk_file_system_win32_create_folder):
* gtk/gtkaction.c (gtk_action_create_menu): Fix NULL/FALSE confusion.
* gtk/gtklinkbutton.c (gtk_link_button_clicked): Pass
the right type to uri_func.
* gtk/gtktext.c (gtk_text_key_press):
* gtk/gtkstatusicon.c (gtk_status_icon_get_property):
* gtk/gtkxembed.c (_gtk_xembed_send_message): Add casts.
* gtk/gtktrayicon-x11.c (gtk_tray_icon_manager_window_destroyed):
(gtk_tray_icon_delete):
* gtk/gtkprintunixdialog.c (create_main_page):
* gtk/gtkhsv.c (gtk_hsv_motion): Remove unused variables.
* gtk/gtkliststore.c: Adapt callbacks to GSequence types.
2007-04-30 Cody Russell <bratsche@gnome.org>
* gdk/win32/gdkwindow-win32.c: Reintroduced erase_background(),

View File

@ -1791,7 +1791,7 @@ gtk_action_disconnect_accelerator (GtkAction *action)
GtkWidget *
gtk_action_create_menu (GtkAction *action)
{
g_return_val_if_fail (GTK_IS_ACTION (action), FALSE);
g_return_val_if_fail (GTK_IS_ACTION (action), NULL);
if (GTK_ACTION_GET_CLASS (action)->create_menu)
return GTK_ACTION_GET_CLASS (action)->create_menu (action);

View File

@ -973,8 +973,8 @@ gtk_file_system_win32_get_info (GtkFileSystem *file_system,
handle = create_handle (file_system);
filename = gtk_file_path_get_string (path);
g_return_val_if_fail (filename != NULL, FALSE);
g_return_val_if_fail (g_path_is_absolute (filename), FALSE);
g_return_val_if_fail (filename != NULL, NULL);
g_return_val_if_fail (g_path_is_absolute (filename), NULL);
if (!stat_with_error (filename, &wfad, &error))
{
@ -1148,7 +1148,7 @@ gtk_file_system_win32_create_folder (GtkFileSystem *file_syst
system_win32 = GTK_FILE_SYSTEM_WIN32 (file_system);
filename = gtk_file_path_get_string (path);
g_return_val_if_fail (filename != NULL, FALSE);
g_return_val_if_fail (filename != NULL, NULL);
g_return_val_if_fail (g_path_is_absolute (filename), NULL);
handle = create_handle (file_system);

View File

@ -842,7 +842,6 @@ gtk_hsv_motion (GtkWidget *widget,
GtkHSV *hsv;
HSVPrivate *priv;
double x, y;
gint ix, iy;
GdkModifierType mods;
hsv = GTK_HSV (widget);

View File

@ -442,7 +442,7 @@ gtk_link_button_clicked (GtkButton *button)
GtkLinkButton *link_button = GTK_LINK_BUTTON (button);
if (uri_func)
(* uri_func) (button, link_button->priv->uri, uri_func_data);
(* uri_func) (link_button, link_button->priv->uri, uri_func_data);
link_button->priv->visited = TRUE;

View File

@ -1295,9 +1295,9 @@ gtk_list_store_row_drop_possible (GtkTreeDragDest *drag_dest,
/* Reordering */
static gint
gtk_list_store_reorder_func (gconstpointer a,
gconstpointer b,
gpointer user_data)
gtk_list_store_reorder_func (GSequenceIter *a,
GSequenceIter *b,
gpointer user_data)
{
GHashTable *new_positions = user_data;
gint apos = GPOINTER_TO_INT (g_hash_table_lookup (new_positions, a));
@ -1534,8 +1534,8 @@ gtk_list_store_move_after (GtkListStore *store,
/* Sorting */
static gint
gtk_list_store_compare_func (gconstpointer a,
gconstpointer b,
gtk_list_store_compare_func (GSequenceIter *a,
GSequenceIter *b,
gpointer user_data)
{
GtkListStore *list_store = user_data;

View File

@ -1437,7 +1437,7 @@ create_main_page (GtkPrintUnixDialog *dialog)
GtkPrintUnixDialogPrivate *priv = dialog->priv;
GtkWidget *main_vbox, *label, *vbox, *hbox;
GtkWidget *scrolled, *treeview, *frame, *table;
GtkWidget *entry, *spinbutton, *event_box;
GtkWidget *entry, *spinbutton;
GtkWidget *radio, *check, *image;
GtkCellRenderer *renderer;
GtkTreeViewColumn *column;

View File

@ -699,7 +699,7 @@ gtk_status_icon_get_property (GObject *object,
break;
case PROP_ORIENTATION:
#ifdef GDK_WINDOWING_X11
g_value_set_enum (value, _gtk_tray_icon_get_orientation (status_icon->priv->tray_icon));
g_value_set_enum (value, _gtk_tray_icon_get_orientation (GTK_TRAY_ICON (status_icon->priv->tray_icon)));
#endif
#ifdef GDK_WINDOWING_WIN32
g_value_set_enum (value, status_icon->priv->orientation);

View File

@ -2060,7 +2060,7 @@ gtk_text_key_press (GtkWidget *widget,
gtk_text_move_backward_character (text);
break;
case 'c':
gtk_editable_copy_clipboard (text);
gtk_editable_copy_clipboard (GTK_EDITABLE (text));
break;
case 'd':
gtk_text_delete_forward_character (text);
@ -2087,13 +2087,13 @@ gtk_text_key_press (GtkWidget *widget,
gtk_text_delete_line (text);
break;
case 'v':
gtk_editable_paste_clipboard (text);
gtk_editable_paste_clipboard (GTK_EDITABLE (text));
break;
case 'w':
gtk_text_delete_backward_word (text);
break;
case 'x':
gtk_editable_cut_clipboard (text);
gtk_editable_cut_clipboard (GTK_EDITABLE (text));
break;
default:
return_val = FALSE;

View File

@ -372,7 +372,6 @@ static void
gtk_tray_icon_manager_window_destroyed (GtkTrayIcon *icon)
{
GtkWidget *widget = GTK_WIDGET (icon);
GdkWindow *gdkwin;
g_return_if_fail (GTK_WIDGET_REALIZED (icon));
g_return_if_fail (icon->priv->manager_window != None);
@ -391,7 +390,6 @@ gtk_tray_icon_delete (GtkWidget *widget,
GdkEventAny *event)
{
GtkTrayIcon *icon = GTK_TRAY_ICON (widget);
GdkWindow *gdkwin;
GTK_NOTE (PLUGSOCKET,
g_print ("GtkStatusIcon %p: delete notify, tray manager window %x\n",

View File

@ -165,7 +165,7 @@ _gtk_xembed_send_message (GdkWindow *recipient,
gdk_error_trap_push ();
XSendEvent (GDK_WINDOW_XDISPLAY(recipient),
GDK_WINDOW_XWINDOW (recipient),
False, NoEventMask, &xclient);
False, NoEventMask, (XEvent *)&xclient);
gdk_display_sync (display);
gdk_error_trap_pop ();
}