Fix many sparse warnings.

This commit is contained in:
Matthias Clasen 2004-10-28 15:00:05 +00:00
parent dbba41045e
commit d5f92150d4
53 changed files with 1673 additions and 1197 deletions

View File

@ -1,5 +1,7 @@
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.

View File

@ -1,5 +1,7 @@
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.

View File

@ -1,5 +1,7 @@
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.

View File

@ -1,5 +1,7 @@
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.

View File

@ -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;
}
/**

View File

@ -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;

View File

@ -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.

View File

@ -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>

View File

@ -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);
}

View File

@ -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()");

View File

@ -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;

View File

@ -917,7 +917,7 @@ broadcast_xmessage (GdkDisplay *display,
0,
CopyFromParent,
CopyFromParent,
CopyFromParent,
(Visual *)CopyFromParent,
CWOverrideRedirect | CWEventMask,
&attrs);
}

View File

@ -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,

View File

@ -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;
}

View File

@ -109,7 +109,7 @@ gdk_set_locale (void)
}
static GdkDisplay *
find_a_display ()
find_a_display (void)
{
GdkDisplay *display = gdk_display_get_default ();

View File

@ -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;

View File

@ -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 ());
}

View File

@ -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;

View File

@ -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.

View File

@ -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);

View File

@ -189,7 +189,7 @@ gtk_curve_init (GtkCurve *curve)
curve->grab_point = -1;
curve->num_points = 0;
curve->point = 0;
curve->point = NULL;
curve->num_ctlpoints = 0;
curve->ctlpoint = NULL;

View File

@ -355,7 +355,7 @@ static struct {
const guchar *mask;
GdkCursor *cursor;
} drag_cursors[] = {
{ GDK_ACTION_DEFAULT, 0 },
{ GDK_ACTION_DEFAULT, NULL },
{ GDK_ACTION_ASK, action_ask_bits, action_ask_mask_bits, NULL },
{ GDK_ACTION_COPY, action_copy_bits, action_copy_mask_bits, NULL },
{ GDK_ACTION_MOVE, action_move_bits, action_move_mask_bits, NULL },

View File

@ -577,7 +577,7 @@ gtk_font_selection_init (GtkFontSelection *fontsel)
}
GtkWidget *
gtk_font_selection_new ()
gtk_font_selection_new (void)
{
GtkFontSelection *fontsel;
@ -644,7 +644,7 @@ set_cursor_to_iter (GtkTreeView *view,
GtkTreeModel *model = gtk_tree_view_get_model (view);
GtkTreePath *path = gtk_tree_model_get_path (model, iter);
gtk_tree_view_set_cursor (view, path, 0, FALSE);
gtk_tree_view_set_cursor (view, path, NULL, FALSE);
gtk_tree_path_free (path);
}

View File

@ -513,7 +513,7 @@ gtk_icon_theme_set_screen (GtkIconTheme *icon_theme,
* with GdkPixbuf.
*/
static gboolean
pixbuf_supports_svg ()
pixbuf_supports_svg (void)
{
GSList *formats = gdk_pixbuf_get_formats ();
GSList *tmp_list;
@ -1434,7 +1434,7 @@ gtk_icon_theme_get_icon_sizes (GtkIconTheme *icon_theme,
GtkIconThemePrivate *priv;
g_return_val_if_fail (GTK_IS_ICON_THEME (icon_theme), FALSE);
g_return_val_if_fail (GTK_IS_ICON_THEME (icon_theme), NULL);
priv = icon_theme->priv;
@ -1544,7 +1544,7 @@ gtk_icon_theme_list_icons (GtkIconTheme *icon_theme,
add_key_to_hash,
icons);
list = 0;
list = NULL;
g_hash_table_foreach (icons,
add_key_to_list,

View File

@ -5433,7 +5433,7 @@ gtk_icon_view_accessible_ref_selection (AtkSelection *selection,
widget = GTK_ACCESSIBLE (selection)->widget;
if (widget == NULL)
return FALSE;
return NULL;
icon_view = GTK_ICON_VIEW (widget);

View File

@ -266,7 +266,7 @@ correct_libdir_prefix (gchar **path)
static void
gtk_im_module_init ()
gtk_im_module_init (void)
{
GString *line_buf = g_string_new (NULL);
GString *tmp_buf = g_string_new (NULL);

View File

@ -335,7 +335,7 @@ gtk_input_dialog_init (GtkInputDialog *inputd)
gtk_widget_show (inputd->axis_listbox);
inputd->axis_list = 0;
inputd->axis_list = NULL;
/* Keys listbox */
@ -351,7 +351,7 @@ gtk_input_dialog_init (GtkInputDialog *inputd)
gtk_widget_show (inputd->keys_listbox);
inputd->keys_list = 0;
inputd->keys_list = NULL;
inputd->save_button = gtk_button_new_from_stock (GTK_STOCK_SAVE);
GTK_WIDGET_SET_FLAGS (inputd->save_button, GTK_CAN_DEFAULT);

View File

@ -393,7 +393,7 @@ gtk_message_dialog_new (GtkWindow *parent,
{
GtkWidget *widget;
GtkDialog *dialog;
gchar* msg = 0;
gchar* msg = NULL;
va_list args;
g_return_val_if_fail (parent == NULL || GTK_IS_WINDOW (parent), NULL);

View File

@ -65,8 +65,8 @@ struct _ButtonData
GtkFilePath *path;
GtkWidget *image;
GtkWidget *label;
gint ignore_changes : 1;
gint file_is_hidden : 1;
guint ignore_changes : 1;
guint file_is_hidden : 1;
};
G_DEFINE_TYPE (GtkPathBar,

View File

@ -79,7 +79,7 @@ enum {
static guint plug_signals[LAST_SIGNAL] = { 0 };
GType
gtk_plug_get_type ()
gtk_plug_get_type (void)
{
static GType plug_type = 0;

View File

@ -713,7 +713,7 @@ gtk_progress_set_format_string (GtkProgress *progress,
gchar *
gtk_progress_get_current_text (GtkProgress *progress)
{
g_return_val_if_fail (GTK_IS_PROGRESS (progress), 0);
g_return_val_if_fail (GTK_IS_PROGRESS (progress), NULL);
if (!progress->adjustment)
gtk_progress_set_adjustment (progress, NULL);
@ -726,7 +726,7 @@ gchar *
gtk_progress_get_text_from_value (GtkProgress *progress,
gdouble value)
{
g_return_val_if_fail (GTK_IS_PROGRESS (progress), 0);
g_return_val_if_fail (GTK_IS_PROGRESS (progress), NULL);
if (!progress->adjustment)
gtk_progress_set_adjustment (progress, NULL);

View File

@ -991,7 +991,7 @@ _gtk_rbtree_reorder (GtkRBTree *tree,
gint *new_order,
gint length)
{
GtkRBReorder reorder = {0, };
GtkRBReorder reorder = { NULL };
GArray *array;
GtkRBNode *node;
gint i;

View File

@ -1354,7 +1354,7 @@ gtk_selection_data_set_uris (GtkSelectionData *selection_data,
gchar *result;
gsize length;
list = g_string_new (0);
list = g_string_new (NULL);
for (i = 0; uris[i]; i++)
{
g_string_append (list, uris[i]);

View File

@ -45,7 +45,7 @@ gtk_signal_newv (const gchar *name,
g_return_val_if_fail (n_params < SIGNAL_MAX_PARAMS, 0);
closure = function_offset ? g_signal_type_cclosure_new (object_type, function_offset) : 0;
closure = function_offset ? g_signal_type_cclosure_new (object_type, function_offset) : NULL;
return g_signal_newv (name, object_type, (GSignalFlags)signal_flags, closure,
NULL, NULL, marshaller, return_val, n_params, params);

View File

@ -3453,7 +3453,7 @@ cut_or_copy (GtkTextBuffer *buffer,
contents))
g_object_unref (contents);
else
gtk_clipboard_set_can_store (clipboard, targets, G_N_ELEMENTS (targets) -1);
gtk_clipboard_set_can_store (clipboard, (GtkTargetEntry *)targets, G_N_ELEMENTS (targets) -1);
if (delete_region_after)
{

View File

@ -230,7 +230,7 @@ row_inserted_marshal (GClosure *closure,
void (* row_inserted_callback) (GtkTreeModel *tree_model,
GtkTreePath *path,
GtkTreeIter *iter) = 0;
GtkTreeIter *iter) = NULL;
GObject *model = g_value_get_object (param_values + 0);
GtkTreePath *path = (GtkTreePath *)g_value_get_boxed (param_values + 1);
@ -261,7 +261,7 @@ row_deleted_marshal (GClosure *closure,
{
GtkTreeModelIface *iface;
void (* row_deleted_callback) (GtkTreeModel *tree_model,
GtkTreePath *path) = 0;
GtkTreePath *path) = NULL;
GObject *model = g_value_get_object (param_values + 0);
GtkTreePath *path = (GtkTreePath *)g_value_get_boxed (param_values + 1);

View File

@ -18,6 +18,7 @@
*/
#include <config.h>
#include <string.h>
#include "gtkalias.h"
#include "gtktreeselection.h"
#include "gtktreeprivate.h"

View File

@ -3700,7 +3700,7 @@ gtk_tree_view_bin_expose (GtkWidget *widget,
if ((node->flags & GTK_RBNODE_IS_PARENT) == GTK_RBNODE_IS_PARENT)
{
gint x, y;
gdk_window_get_pointer (tree_view->priv->bin_window, &x, &y, 0);
gdk_window_get_pointer (tree_view->priv->bin_window, &x, &y, NULL);
gtk_tree_view_draw_arrow (GTK_TREE_VIEW (widget),
tree,
node,

View File

@ -411,7 +411,7 @@ gtk_ui_manager_finalize (GObject *object)
g_node_traverse (self->private_data->root_node,
G_POST_ORDER, G_TRAVERSE_ALL, -1,
(GNodeTraverseFunc)free_node, 0);
(GNodeTraverseFunc)free_node, NULL);
g_node_destroy (self->private_data->root_node);
self->private_data->root_node = NULL;
@ -2197,7 +2197,7 @@ update_node (GtkUIManager *self,
gtk_menu_item_set_submenu (GTK_MENU_ITEM (info->proxy), menu);
gtk_menu_shell_insert (GTK_MENU_SHELL (menushell), info->proxy, pos);
g_signal_connect (info->proxy, "notify::visible",
G_CALLBACK (update_smart_separators), 0);
G_CALLBACK (update_smart_separators), NULL);
}
}
else
@ -2341,7 +2341,7 @@ update_node (GtkUIManager *self,
{
g_signal_handlers_disconnect_by_func (info->proxy,
G_CALLBACK (update_smart_separators),
0);
NULL);
gtk_action_disconnect_proxy (info->action, info->proxy);
gtk_container_remove (GTK_CONTAINER (info->proxy->parent),
info->proxy);
@ -2369,12 +2369,12 @@ update_node (GtkUIManager *self,
{
g_signal_handlers_disconnect_by_func (info->proxy,
G_CALLBACK (update_smart_separators),
0);
NULL);
gtk_menu_item_set_submenu (GTK_MENU_ITEM (info->proxy), NULL);
gtk_action_connect_proxy (action, info->proxy);
}
g_signal_connect (info->proxy, "notify::visible",
G_CALLBACK (update_smart_separators), 0);
G_CALLBACK (update_smart_separators), NULL);
if (in_popup)
{
/* don't show accels in popups */
@ -2392,7 +2392,7 @@ update_node (GtkUIManager *self,
{
g_signal_handlers_disconnect_by_func (info->proxy,
G_CALLBACK (update_smart_separators),
0);
NULL);
gtk_action_disconnect_proxy (info->action, info->proxy);
gtk_container_remove (GTK_CONTAINER (info->proxy->parent),
info->proxy);
@ -2428,11 +2428,11 @@ update_node (GtkUIManager *self,
{
g_signal_handlers_disconnect_by_func (info->proxy,
G_CALLBACK (update_smart_separators),
0);
NULL);
gtk_action_connect_proxy (action, info->proxy);
}
g_signal_connect (info->proxy, "notify::visible",
G_CALLBACK (update_smart_separators), 0);
G_CALLBACK (update_smart_separators), NULL);
break;
case NODE_TYPE_SEPARATOR:
if (NODE_INFO (node->parent)->type == NODE_TYPE_TOOLBAR ||

View File

@ -1379,7 +1379,7 @@ gtk_im_context_xim_get_ic (GtkIMContextXIM *context_xim)
const char *name2 = NULL;
XVaNestedList list2 = NULL;
XIMStyle im_style = 0;
XIC xic = 0;
XIC xic = NULL;
if (context_xim->use_preedit &&
(context_xim->im_info->style & PREEDIT_MASK) == XIMPreeditCallbacks)

File diff suppressed because it is too large Load Diff

View File

@ -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;

View File

@ -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;

View File

@ -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);
}

View File

@ -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))

View File

@ -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 ();

View File

@ -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))

View File

@ -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);

View File

@ -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);
}
}
}

View File

@ -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);

View File

@ -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 },
};

View File

@ -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;
}

View File

@ -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))