Commit d5f92150 authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Fix many sparse warnings.

parent dbba4104
2004-10-28 Matthias Clasen <mclasen@redhat.com>
* *: Clean up many sparse warnings. (#156698, Kjartan Maraas)
* gtk/gtktreeview.c (gtk_tree_view_remove_widget): Disconnect
from the remove-widget signal after removing the signal.
......
2004-10-28 Matthias Clasen <mclasen@redhat.com>
* *: Clean up many sparse warnings. (#156698, Kjartan Maraas)
* gtk/gtktreeview.c (gtk_tree_view_remove_widget): Disconnect
from the remove-widget signal after removing the signal.
......
2004-10-28 Matthias Clasen <mclasen@redhat.com>
* *: Clean up many sparse warnings. (#156698, Kjartan Maraas)
* gtk/gtktreeview.c (gtk_tree_view_remove_widget): Disconnect
from the remove-widget signal after removing the signal.
......
2004-10-28 Matthias Clasen <mclasen@redhat.com>
* *: Clean up many sparse warnings. (#156698, Kjartan Maraas)
* gtk/gtktreeview.c (gtk_tree_view_remove_widget): Disconnect
from the remove-widget signal after removing the signal.
......
......@@ -821,7 +821,7 @@ xlib_rgb_init_with_depth (Display *display, Screen *screen, int prefDepth)
image_info->stage_buf = NULL;
image_info->own_gc = 0;
image_info->own_gc = NULL;
image_info->red_shift = 0;
image_info->red_prec = 0;
......@@ -908,7 +908,7 @@ xlib_rgb_init_with_depth (Display *display, Screen *screen, int prefDepth)
image_info->x_visual_info->visual,
1,
XYBitmap,
0, 0, IMAGE_WIDTH, IMAGE_HEIGHT,
0, NULL, IMAGE_WIDTH, IMAGE_HEIGHT,
8,
0);
static_image[i]->data = malloc(IMAGE_WIDTH * IMAGE_HEIGHT >> 3);
......@@ -920,7 +920,7 @@ xlib_rgb_init_with_depth (Display *display, Screen *screen, int prefDepth)
image_info->x_visual_info->visual,
(unsigned int)image_info->x_visual_info->depth,
ZPixmap,
0, 0,
0, NULL,
IMAGE_WIDTH,
IMAGE_HEIGHT,
32, 0);
......@@ -3651,7 +3651,7 @@ xlib_rgb_get_visual (void)
if (image_info)
return image_info->x_visual_info->visual;
else
return 0;
return NULL;
}
/**
......@@ -3668,7 +3668,7 @@ xlib_rgb_get_visual_info (void)
if (image_info)
return image_info->x_visual_info;
else
return 0;
return NULL;
}
/**
......
......@@ -386,7 +386,7 @@ parse_chars (gchar *text,
/* While not as cool as c-mode, this will do as a quick attempt at highlighting */
static void
fontify ()
fontify (void)
{
GtkTextIter start_iter, next_iter, tmp_iter;
gint state;
......
......@@ -4,6 +4,8 @@
2004-10-26 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-sections.txt: Additions.
* gdk-pixbuf/tmpl/scaling.sgml: Document GdkPixbufRotation.
* gtk/gtk-update-icon-cache.1: Regenerated.
......
......@@ -30,6 +30,8 @@ gtk_about_dialog_get_translator_credits
gtk_about_dialog_set_translator_credits
gtk_about_dialog_get_logo
gtk_about_dialog_set_logo
gtk_about_dialog_get_logo_icon_name
gtk_about_dialog_set_logo_icon_name
GtkAboutDialogActivateLinkFunc
gtk_about_dialog_set_email_hook
gtk_about_dialog_set_url_hook
......@@ -5113,6 +5115,8 @@ gtk_drag_source_unset
gtk_drag_source_set_target_list
gtk_drag_source_get_target_list
gtk_drag_source_add_text_targets
gtk_drag_source_add_image_targets
gtk_drag_source_add_uri_targets
</SECTION>
......
......@@ -81,7 +81,7 @@ static GSList *file_formats = NULL;
static void gdk_pixbuf_io_init ();
static GSList *
get_file_formats ()
get_file_formats (void)
{
if (file_formats == NULL)
gdk_pixbuf_io_init ();
......@@ -236,7 +236,7 @@ gdk_pixbuf_get_module_file (void)
}
static void
gdk_pixbuf_io_init ()
gdk_pixbuf_io_init (void)
{
GIOChannel *channel;
gchar *line_buf;
......@@ -334,7 +334,7 @@ gdk_pixbuf_io_init ()
module->info->mime_types =
g_realloc (module->info->mime_types, (n + 1) * sizeof (gchar*));
module->info->mime_types[n - 1] = g_strdup (tmp_buf->str);
module->info->mime_types[n] = 0;
module->info->mime_types[n] = NULL;
n++;
}
}
......@@ -347,7 +347,7 @@ gdk_pixbuf_io_init ()
module->info->extensions =
g_realloc (module->info->extensions, (n + 1) * sizeof (gchar*));
module->info->extensions[n - 1] = g_strdup (tmp_buf->str);
module->info->extensions[n] = 0;
module->info->extensions[n] = NULL;
n++;
}
}
......@@ -1952,7 +1952,7 @@ gdk_pixbuf_format_set_disabled (GdkPixbufFormat *format,
gchar*
gdk_pixbuf_format_get_license (GdkPixbufFormat *format)
{
g_return_val_if_fail (format != NULL, FALSE);
g_return_val_if_fail (format != NULL, NULL);
return g_strdup (format->license);
}
......
......@@ -353,13 +353,13 @@ gdk_exit (gint errorcode)
}
void
gdk_threads_enter ()
gdk_threads_enter (void)
{
GDK_THREADS_ENTER ();
}
void
gdk_threads_leave ()
gdk_threads_leave (void)
{
GDK_THREADS_LEAVE ();
}
......@@ -389,7 +389,7 @@ gdk_threads_impl_unlock (void)
* GTK+; to be safe, call it before gtk_init().
**/
void
gdk_threads_init ()
gdk_threads_init (void)
{
if (!g_thread_supported ())
g_error ("g_thread_init() must be called before gdk_threads_init()");
......
......@@ -1042,7 +1042,7 @@ _gdk_event_button_generate (GdkDisplay *display,
display->button_click_time[1] = 0;
display->button_click_time[0] = 0;
display->button_window[1] = NULL;
display->button_window[0] = 0;
display->button_window[0] = NULL;
display->button_number[1] = -1;
display->button_number[0] = -1;
display->button_x[0] = display->button_x[1] = 0;
......
......@@ -917,7 +917,7 @@ broadcast_xmessage (GdkDisplay *display,
0,
CopyFromParent,
CopyFromParent,
CopyFromParent,
(Visual *)CopyFromParent,
CWOverrideRedirect | CWEventMask,
&attrs);
}
......
......@@ -853,7 +853,7 @@ motif_find_drag_window (GdkDisplay *display,
XCreateWindow (persistant_xdisplay,
RootWindow (persistant_xdisplay, 0),
-100, -100, 10, 10, 0, 0,
InputOnly, CopyFromParent,
InputOnly, (Visual *)CopyFromParent,
(CWOverrideRedirect | CWEventMask), &attr);
GDK_NOTE (DND,
......
......@@ -853,7 +853,7 @@ static GdkDrawable * get_impl_drawable (GdkDrawable *drawable)
else
{
g_warning (G_STRLOC " drawable is not a pixmap or window");
return None;
return (GdkDrawable *)None;
}
return impl;
}
......
......@@ -109,7 +109,7 @@ gdk_set_locale (void)
}
static GdkDisplay *
find_a_display ()
find_a_display (void)
{
GdkDisplay *display = gdk_display_get_default ();
......
......@@ -183,7 +183,7 @@ gdk_image_new_bitmap(GdkVisual *visual, gpointer data, gint width, gint height)
xvisual = ((GdkVisualPrivate*) visual)->xvisual;
private->ximage = XCreateImage (GDK_SCREEN_XDISPLAY (private->screen),
xvisual, 1, XYBitmap,
0, 0, width, height, 8, 0);
0, NULL, width, height, 8, 0);
}
private->ximage->data = data;
......@@ -318,7 +318,7 @@ _gdk_image_new_for_depth (GdkScreen *screen,
}
x_shm_info->readOnly = False;
x_shm_info->shmaddr = shmat (x_shm_info->shmid, 0, 0);
x_shm_info->shmaddr = shmat (x_shm_info->shmid, NULL, 0);
private->ximage->data = x_shm_info->shmaddr;
if (x_shm_info->shmaddr == (char*) -1)
......@@ -350,7 +350,7 @@ _gdk_image_new_for_depth (GdkScreen *screen,
* we die in XShmAttach. In theory, a signal handler
* could be set up.
*/
shmctl (x_shm_info->shmid, IPC_RMID, 0);
shmctl (x_shm_info->shmid, IPC_RMID, NULL);
if (image)
image_list = g_list_prepend (image_list, image);
......@@ -361,7 +361,7 @@ _gdk_image_new_for_depth (GdkScreen *screen,
break;
case GDK_IMAGE_NORMAL:
private->ximage = XCreateImage (screen_x11->xdisplay, xvisual, depth,
ZPixmap, 0, 0, width, height, 32, 0);
ZPixmap, 0, NULL, width, height, 32, 0);
/* Use malloc, not g_malloc here, because X will call free()
* on this data
......@@ -402,7 +402,7 @@ _gdk_image_new_for_depth (GdkScreen *screen,
if (x_shm_info->shmaddr != (char *)-1)
shmdt (x_shm_info->shmaddr);
if (x_shm_info->shmid != -1)
shmctl (x_shm_info->shmid, IPC_RMID, 0);
shmctl (x_shm_info->shmid, IPC_RMID, NULL);
g_free (x_shm_info);
private->x_shm_info = NULL;
......
......@@ -736,7 +736,7 @@ _gdk_region_get_xrectangles (GdkRegion *region,
* gdk_x11_grab_server()/gdk_x11_ungrab_server() calls can be nested.
**/
void
gdk_x11_grab_server ()
gdk_x11_grab_server (void)
{
gdk_x11_display_grab (gdk_display_get_default ());
}
......@@ -748,7 +748,7 @@ gdk_x11_grab_server ()
* gdk_x11_grab_server().
**/
void
gdk_x11_ungrab_server ()
gdk_x11_ungrab_server (void)
{
gdk_x11_display_ungrab (gdk_display_get_default ());
}
......
......@@ -61,7 +61,7 @@ static gpointer parent_class = NULL;
static guint signals[LAST_SIGNAL] = { 0 };
GType
_gdk_screen_x11_get_type ()
_gdk_screen_x11_get_type (void)
{
static GType object_type = 0;
......
......@@ -2262,7 +2262,7 @@ gdk_window_set_modal_hint (GdkWindow *window,
if (GDK_WINDOW_IS_MAPPED (window))
gdk_wmspec_change_state (modal, window,
gdk_atom_intern ("_NET_WM_STATE_MODAL", FALSE),
0);
NULL);
}
/**
......@@ -2298,7 +2298,7 @@ gdk_window_set_skip_taskbar_hint (GdkWindow *window,
if (GDK_WINDOW_IS_MAPPED (window))
gdk_wmspec_change_state (skips_taskbar, window,
gdk_atom_intern ("_NET_WM_STATE_SKIP_TASKBAR", FALSE),
0);
NULL);
}
/**
......@@ -2335,7 +2335,7 @@ gdk_window_set_skip_pager_hint (GdkWindow *window,
if (GDK_WINDOW_IS_MAPPED (window))
gdk_wmspec_change_state (skips_pager, window,
gdk_atom_intern ("_NET_WM_STATE_SKIP_PAGER", FALSE),
0);
NULL);
}
/**
......@@ -4064,7 +4064,7 @@ gdk_window_stick (GdkWindow *window)
/* Request stick during viewport scroll */
gdk_wmspec_change_state (TRUE, window,
gdk_atom_intern ("_NET_WM_STATE_STICKY", FALSE),
0);
NULL);
/* Request desktop 0xFFFFFFFF */
xev.xclient.type = ClientMessage;
......@@ -4124,7 +4124,7 @@ gdk_window_unstick (GdkWindow *window)
/* Request unstick from viewport */
gdk_wmspec_change_state (FALSE, window,
gdk_atom_intern ("_NET_WM_STATE_STICKY", FALSE),
0);
NULL);
/* Get current desktop, then set it; this is a race, but not
* one that matters much in practice.
......
......@@ -519,7 +519,7 @@ gtk_about_dialog_get_property (GObject *object,
case PROP_LOGO_ICON_NAME:
if (gtk_image_get_storage_type (GTK_IMAGE (priv->logo_image)) == GTK_IMAGE_ICON_NAME)
{
gchar *icon_name;
const gchar *icon_name;
gtk_image_get_icon_name (GTK_IMAGE (priv->logo_image), &icon_name, NULL);
g_value_set_string (value, icon_name);
......@@ -1333,7 +1333,7 @@ G_CONST_RETURN gchar *
gtk_about_dialog_get_logo_icon_name (GtkAboutDialog *about)
{
GtkAboutDialogPrivate *priv;
gchar *icon_name = NULL;
const gchar *icon_name;
g_return_val_if_fail (GTK_IS_ABOUT_DIALOG (about), NULL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment