summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@src.gnome.org>1998-12-24 17:47:02 +0000
committerJeff Garzik <jgarzik@src.gnome.org>1998-12-24 17:47:02 +0000
commit553fa4309eb849f592afa0aead4c669be21ac117 (patch)
tree9bbbce3406d299faa53aa53d5fc74789225c2c16
parent9775547b4a062f9b73a3498a0667e12b99313a44 (diff)
downloadgdk-pixbuf-553fa4309eb849f592afa0aead4c669be21ac117.tar.gz
removed unused var 64-bit cast point to const data Made const-correct.
* gdk/gdkfont.c: removed unused var * gdk/gdkim.c: 64-bit cast * gtk/gtkaccelgroup.c: point to const data * gtk/gtkdnd.[ch]: (gtk_drag_dest_set, gtk_drag_source_set): Made const-correct. * gtk/gtkfontsel.c: kill uninitialized var warning * gtk/gtkselection.[ch]: (gtk_target_list_new, gtk_target_list_add_table, gtk_selection_add_targets): Made const-correct. * gtk/testgtk.c: 64-bit cast
-rw-r--r--ChangeLog13
-rw-r--r--ChangeLog.pre-2-013
-rw-r--r--ChangeLog.pre-2-1013
-rw-r--r--ChangeLog.pre-2-213
-rw-r--r--ChangeLog.pre-2-413
-rw-r--r--ChangeLog.pre-2-613
-rw-r--r--ChangeLog.pre-2-813
-rw-r--r--gdk/gdkfont.c1
-rw-r--r--gdk/gdkim.c2
-rw-r--r--gdk/x11/gdkfont-x11.c1
-rw-r--r--gdk/x11/gdkim-x11.c2
-rw-r--r--gtk/gtkaccelgroup.c2
-rw-r--r--gtk/gtkdnd.c20
-rw-r--r--gtk/gtkdnd.h20
-rw-r--r--gtk/gtkfontsel.c3
-rw-r--r--gtk/gtkselection.c18
-rw-r--r--gtk/gtkselection.h18
-rw-r--r--gtk/testgtk.c2
-rw-r--r--tests/testgtk.c2
19 files changed, 136 insertions, 46 deletions
diff --git a/ChangeLog b/ChangeLog
index 96393b6f5..061818df1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Thu Dec 24 12:40:45 1998 Jeff Garzik <jgarzik@pobox.com>
+
+ * gdk/gdkfont.c: removed unused var
+ * gdk/gdkim.c: 64-bit cast
+ * gtk/gtkaccelgroup.c: point to const data
+ * gtk/gtkdnd.[ch]: (gtk_drag_dest_set, gtk_drag_source_set):
+ Made const-correct.
+ * gtk/gtkfontsel.c: kill uninitialized var warning
+ * gtk/gtkselection.[ch]: (gtk_target_list_new,
+ gtk_target_list_add_table, gtk_selection_add_targets):
+ Made const-correct.
+ * gtk/testgtk.c: 64-bit cast
+
Thu Dec 24 03:16:52 CST 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.1.10
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index 96393b6f5..061818df1 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,16 @@
+Thu Dec 24 12:40:45 1998 Jeff Garzik <jgarzik@pobox.com>
+
+ * gdk/gdkfont.c: removed unused var
+ * gdk/gdkim.c: 64-bit cast
+ * gtk/gtkaccelgroup.c: point to const data
+ * gtk/gtkdnd.[ch]: (gtk_drag_dest_set, gtk_drag_source_set):
+ Made const-correct.
+ * gtk/gtkfontsel.c: kill uninitialized var warning
+ * gtk/gtkselection.[ch]: (gtk_target_list_new,
+ gtk_target_list_add_table, gtk_selection_add_targets):
+ Made const-correct.
+ * gtk/testgtk.c: 64-bit cast
+
Thu Dec 24 03:16:52 CST 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.1.10
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 96393b6f5..061818df1 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,16 @@
+Thu Dec 24 12:40:45 1998 Jeff Garzik <jgarzik@pobox.com>
+
+ * gdk/gdkfont.c: removed unused var
+ * gdk/gdkim.c: 64-bit cast
+ * gtk/gtkaccelgroup.c: point to const data
+ * gtk/gtkdnd.[ch]: (gtk_drag_dest_set, gtk_drag_source_set):
+ Made const-correct.
+ * gtk/gtkfontsel.c: kill uninitialized var warning
+ * gtk/gtkselection.[ch]: (gtk_target_list_new,
+ gtk_target_list_add_table, gtk_selection_add_targets):
+ Made const-correct.
+ * gtk/testgtk.c: 64-bit cast
+
Thu Dec 24 03:16:52 CST 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.1.10
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 96393b6f5..061818df1 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,16 @@
+Thu Dec 24 12:40:45 1998 Jeff Garzik <jgarzik@pobox.com>
+
+ * gdk/gdkfont.c: removed unused var
+ * gdk/gdkim.c: 64-bit cast
+ * gtk/gtkaccelgroup.c: point to const data
+ * gtk/gtkdnd.[ch]: (gtk_drag_dest_set, gtk_drag_source_set):
+ Made const-correct.
+ * gtk/gtkfontsel.c: kill uninitialized var warning
+ * gtk/gtkselection.[ch]: (gtk_target_list_new,
+ gtk_target_list_add_table, gtk_selection_add_targets):
+ Made const-correct.
+ * gtk/testgtk.c: 64-bit cast
+
Thu Dec 24 03:16:52 CST 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.1.10
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 96393b6f5..061818df1 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,16 @@
+Thu Dec 24 12:40:45 1998 Jeff Garzik <jgarzik@pobox.com>
+
+ * gdk/gdkfont.c: removed unused var
+ * gdk/gdkim.c: 64-bit cast
+ * gtk/gtkaccelgroup.c: point to const data
+ * gtk/gtkdnd.[ch]: (gtk_drag_dest_set, gtk_drag_source_set):
+ Made const-correct.
+ * gtk/gtkfontsel.c: kill uninitialized var warning
+ * gtk/gtkselection.[ch]: (gtk_target_list_new,
+ gtk_target_list_add_table, gtk_selection_add_targets):
+ Made const-correct.
+ * gtk/testgtk.c: 64-bit cast
+
Thu Dec 24 03:16:52 CST 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.1.10
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 96393b6f5..061818df1 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,16 @@
+Thu Dec 24 12:40:45 1998 Jeff Garzik <jgarzik@pobox.com>
+
+ * gdk/gdkfont.c: removed unused var
+ * gdk/gdkim.c: 64-bit cast
+ * gtk/gtkaccelgroup.c: point to const data
+ * gtk/gtkdnd.[ch]: (gtk_drag_dest_set, gtk_drag_source_set):
+ Made const-correct.
+ * gtk/gtkfontsel.c: kill uninitialized var warning
+ * gtk/gtkselection.[ch]: (gtk_target_list_new,
+ gtk_target_list_add_table, gtk_selection_add_targets):
+ Made const-correct.
+ * gtk/testgtk.c: 64-bit cast
+
Thu Dec 24 03:16:52 CST 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.1.10
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 96393b6f5..061818df1 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,16 @@
+Thu Dec 24 12:40:45 1998 Jeff Garzik <jgarzik@pobox.com>
+
+ * gdk/gdkfont.c: removed unused var
+ * gdk/gdkim.c: 64-bit cast
+ * gtk/gtkaccelgroup.c: point to const data
+ * gtk/gtkdnd.[ch]: (gtk_drag_dest_set, gtk_drag_source_set):
+ Made const-correct.
+ * gtk/gtkfontsel.c: kill uninitialized var warning
+ * gtk/gtkselection.[ch]: (gtk_target_list_new,
+ gtk_target_list_add_table, gtk_selection_add_targets):
+ Made const-correct.
+ * gtk/testgtk.c: 64-bit cast
+
Thu Dec 24 03:16:52 CST 1998 Shawn T. Amundson <amundson@gtk.org>
* Released GTK+ 1.1.10
diff --git a/gdk/gdkfont.c b/gdk/gdkfont.c
index e36fde170..c2bd18744 100644
--- a/gdk/gdkfont.c
+++ b/gdk/gdkfont.c
@@ -521,7 +521,6 @@ gdk_text_extents_wc (GdkFont *font,
int direction;
int font_ascent;
int font_descent;
- gint i;
g_return_if_fail (font != NULL);
g_return_if_fail (text != NULL);
diff --git a/gdk/gdkim.c b/gdk/gdkim.c
index 182bb3b4e..622b4c8e2 100644
--- a/gdk/gdkim.c
+++ b/gdk/gdkim.c
@@ -731,7 +731,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
if (mask & GDK_IC_LINE_SPACING)
{
arg->name = XNLineSpace;
- arg->value = (gpointer) attr->line_spacing;
+ arg->value = GINT_TO_POINTER( attr->line_spacing );
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL))
error |= GDK_IC_LINE_SPACING;
diff --git a/gdk/x11/gdkfont-x11.c b/gdk/x11/gdkfont-x11.c
index e36fde170..c2bd18744 100644
--- a/gdk/x11/gdkfont-x11.c
+++ b/gdk/x11/gdkfont-x11.c
@@ -521,7 +521,6 @@ gdk_text_extents_wc (GdkFont *font,
int direction;
int font_ascent;
int font_descent;
- gint i;
g_return_if_fail (font != NULL);
g_return_if_fail (text != NULL);
diff --git a/gdk/x11/gdkim-x11.c b/gdk/x11/gdkim-x11.c
index 182bb3b4e..622b4c8e2 100644
--- a/gdk/x11/gdkim-x11.c
+++ b/gdk/x11/gdkim-x11.c
@@ -731,7 +731,7 @@ gdk_ic_real_set_attr (GdkIC *ic,
if (mask & GDK_IC_LINE_SPACING)
{
arg->name = XNLineSpace;
- arg->value = (gpointer) attr->line_spacing;
+ arg->value = GINT_TO_POINTER( attr->line_spacing );
if (XSetICValues (xic, XNPreeditAttributes, arg, NULL))
error |= GDK_IC_LINE_SPACING;
diff --git a/gtk/gtkaccelgroup.c b/gtk/gtkaccelgroup.c
index f929912fb..f5570dd4f 100644
--- a/gtk/gtkaccelgroup.c
+++ b/gtk/gtkaccelgroup.c
@@ -716,7 +716,7 @@ gtk_accelerator_valid (guint keyval,
GDK_Terminate_Server, GDK_AudibleBell_Enable,
0
};
- guint *ac_val;
+ const guint *ac_val;
modifiers &= GDK_MODIFIER_MASK;
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index 1aa4bbcbc..4f74cfef8 100644
--- a/gtk/gtkdnd.c
+++ b/gtk/gtkdnd.c
@@ -698,11 +698,11 @@ gtk_drag_unhighlight (GtkWidget *widget)
*************************************************************/
void
-gtk_drag_dest_set (GtkWidget *widget,
- GtkDestDefaults flags,
- GtkTargetEntry *targets,
- gint n_targets,
- GdkDragAction actions)
+gtk_drag_dest_set (GtkWidget *widget,
+ GtkDestDefaults flags,
+ const GtkTargetEntry *targets,
+ gint n_targets,
+ GdkDragAction actions)
{
GtkDragDestSite *site;
@@ -1571,11 +1571,11 @@ gtk_drag_begin (GtkWidget *widget,
*************************************************************/
void
-gtk_drag_source_set (GtkWidget *widget,
- GdkModifierType start_button_mask,
- GtkTargetEntry *targets,
- gint n_targets,
- GdkDragAction actions)
+gtk_drag_source_set (GtkWidget *widget,
+ GdkModifierType start_button_mask,
+ const GtkTargetEntry *targets,
+ gint n_targets,
+ GdkDragAction actions)
{
GtkDragSourceSite *site;
diff --git a/gtk/gtkdnd.h b/gtk/gtkdnd.h
index c665a1736..90513d51a 100644
--- a/gtk/gtkdnd.h
+++ b/gtk/gtkdnd.h
@@ -58,11 +58,11 @@ GtkWidget *gtk_drag_get_source_widget (GdkDragContext *context);
void gtk_drag_highlight (GtkWidget *widget);
void gtk_drag_unhighlight (GtkWidget *widget);
-void gtk_drag_dest_set (GtkWidget *widget,
- GtkDestDefaults flags,
- GtkTargetEntry *targets,
- gint n_targets,
- GdkDragAction actions);
+void gtk_drag_dest_set (GtkWidget *widget,
+ GtkDestDefaults flags,
+ const GtkTargetEntry *targets,
+ gint n_targets,
+ GdkDragAction actions);
void gtk_drag_dest_set_proxy (GtkWidget *widget,
GdkWindow *proxy_window,
@@ -77,11 +77,11 @@ void gtk_drag_dest_unset (GtkWidget *widget);
/* Source side */
-void gtk_drag_source_set (GtkWidget *widget,
- GdkModifierType start_button_mask,
- GtkTargetEntry *targets,
- gint n_targets,
- GdkDragAction actions);
+void gtk_drag_source_set (GtkWidget *widget,
+ GdkModifierType start_button_mask,
+ const GtkTargetEntry *targets,
+ gint n_targets,
+ GdkDragAction actions);
void gtk_drag_source_unset (GtkWidget *widget);
diff --git a/gtk/gtkfontsel.c b/gtk/gtkfontsel.c
index a3cfc5ecb..bfe4132d7 100644
--- a/gtk/gtkfontsel.c
+++ b/gtk/gtkfontsel.c
@@ -1264,7 +1264,7 @@ gtk_font_selection_select_best_style(GtkFontSelection *fontsel,
FontInfo *font;
FontStyle *styles;
gint row, prop, style, matched;
- gint best_matched = -1, best_style = -1, best_row;
+ gint best_matched = -1, best_style = -1, best_row = -1;
#ifdef FONTSEL_DEBUG
g_message("In select_best_style\n");
@@ -1301,6 +1301,7 @@ gtk_font_selection_select_best_style(GtkFontSelection *fontsel,
}
}
g_return_if_fail (best_style != -1);
+ g_return_if_fail (best_row != -1);
fontsel->style = best_style;
diff --git a/gtk/gtkselection.c b/gtk/gtkselection.c
index 2aa6c8cbd..c9ed219f1 100644
--- a/gtk/gtkselection.c
+++ b/gtk/gtkselection.c
@@ -151,8 +151,8 @@ static const char *gtk_selection_handler_key = "gtk-selection-handlers";
*/
GtkTargetList *
-gtk_target_list_new (GtkTargetEntry *targets,
- guint ntargets)
+gtk_target_list_new (const GtkTargetEntry *targets,
+ guint ntargets)
{
GtkTargetList *result = g_new (GtkTargetList, 1);
result->list = NULL;
@@ -206,9 +206,9 @@ gtk_target_list_add (GtkTargetList *list,
}
void
-gtk_target_list_add_table (GtkTargetList *list,
- GtkTargetEntry *targets,
- guint ntargets)
+gtk_target_list_add_table (GtkTargetList *list,
+ const GtkTargetEntry *targets,
+ guint ntargets)
{
gint i;
@@ -461,10 +461,10 @@ gtk_selection_add_target (GtkWidget *widget,
}
void
-gtk_selection_add_targets (GtkWidget *widget,
- GdkAtom selection,
- GtkTargetEntry *targets,
- guint ntargets)
+gtk_selection_add_targets (GtkWidget *widget,
+ GdkAtom selection,
+ const GtkTargetEntry *targets,
+ guint ntargets)
{
GtkTargetList *list;
diff --git a/gtk/gtkselection.h b/gtk/gtkselection.h
index 75fcd5aeb..02fce9f7b 100644
--- a/gtk/gtkselection.h
+++ b/gtk/gtkselection.h
@@ -56,17 +56,17 @@ struct _GtkTargetPair {
guint info;
};
-GtkTargetList *gtk_target_list_new (GtkTargetEntry *targets,
- guint ntargets);
+GtkTargetList *gtk_target_list_new (const GtkTargetEntry *targets,
+ guint ntargets);
void gtk_target_list_ref (GtkTargetList *list);
void gtk_target_list_unref (GtkTargetList *list);
void gtk_target_list_add (GtkTargetList *list,
GdkAtom target,
guint flags,
guint info);
-void gtk_target_list_add_table (GtkTargetList *list,
- GtkTargetEntry *targets,
- guint ntargets);
+void gtk_target_list_add_table (GtkTargetList *list,
+ const GtkTargetEntry *targets,
+ guint ntargets);
void gtk_target_list_remove (GtkTargetList *list,
GdkAtom target);
gboolean gtk_target_list_find (GtkTargetList *list,
@@ -82,10 +82,10 @@ void gtk_selection_add_target (GtkWidget *widget,
GdkAtom selection,
GdkAtom target,
guint info);
-void gtk_selection_add_targets (GtkWidget *widget,
- GdkAtom selection,
- GtkTargetEntry *targets,
- guint ntargets);
+void gtk_selection_add_targets (GtkWidget *widget,
+ GdkAtom selection,
+ const GtkTargetEntry *targets,
+ guint ntargets);
gint gtk_selection_convert (GtkWidget *widget,
GdkAtom selection,
GdkAtom target,
diff --git a/gtk/testgtk.c b/gtk/testgtk.c
index d53958a00..5d5fc5386 100644
--- a/gtk/testgtk.c
+++ b/gtk/testgtk.c
@@ -7953,7 +7953,7 @@ static void
toggle_idle_container (GtkObject *button,
GtkContainer *container)
{
- gtk_container_set_resize_mode (container, (guint) gtk_object_get_user_data (button));
+ gtk_container_set_resize_mode (container, GPOINTER_TO_INT (gtk_object_get_user_data (button)));
}
static void
diff --git a/tests/testgtk.c b/tests/testgtk.c
index d53958a00..5d5fc5386 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -7953,7 +7953,7 @@ static void
toggle_idle_container (GtkObject *button,
GtkContainer *container)
{
- gtk_container_set_resize_mode (container, (guint) gtk_object_get_user_data (button));
+ gtk_container_set_resize_mode (container, GPOINTER_TO_INT (gtk_object_get_user_data (button)));
}
static void