[patch] fix a few gtk+ compiler warnings -- OK to commit?
- From: Darin Adler <darin bentspoon com>
- To: Gtk Developers <gtk-devel-list gnome org>
- Subject: [patch] fix a few gtk+ compiler warnings -- OK to commit?
- Date: Thu, 13 Dec 2001 12:40:49 -0800
This is small enough that I didn't want to make a bug report. Please read
the release note rationale for the do/while change before rejecting it out
of hand.
OK for me to commit these changes?
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtk+/ChangeLog,v
retrieving revision 1.2710
diff -p -u -r1.2710 ChangeLog
--- ChangeLog 2001/12/13 19:51:17 1.2710
+++ ChangeLog 2001/12/13 20:36:29
@@ -1,3 +1,16 @@
+2001-12-13 Darin Adler <darin bentspoon com>
+
+ Fix some warnings.
+
+ * gdk/x11/gdkproperty-x11.c: (gdk_property_get): Fix wrong type in
+ g_new -- bug if sizeof (GtkAtom) != sizeof (GtkAtom *).
+ * gdk/x11/gdkwindow-x11.c: (create_moveresize_window): FALSE -> NULL
+ * gtk/gtkaccellabel.c: (gtk_accel_label_refetch): Remove unused local.
+ * gtk/gtklistitem.c: (gtk_list_item_expose): Remove unused local.
+ * gtk/gtktextiter.c: (_gtk_text_iter_backward_indexable_segment):
+ Restructure loop to get rid of uninitialized variable warning. Also
+ gives a tiny efficiency gain.
+
2001-12-13 Matthias Clasen <matthiasc poet de>
* gtk/gtkdialog.c, gtk/gtkrc.c, gtk/gtkwidget.c: Markup fixes.
Index: gdk/x11/gdkproperty-x11.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/x11/gdkproperty-x11.c,v
retrieving revision 1.24
diff -p -u -r1.24 gdkproperty-x11.c
--- gdk/x11/gdkproperty-x11.c 2001/11/29 00:43:24 1.24
+++ gdk/x11/gdkproperty-x11.c 2001/12/13 20:36:29
@@ -388,7 +388,7 @@ gdk_property_get (GdkWindow *window,
* to an array of GDK Atoms
*/
gint i;
- GdkAtom *ret_atoms = g_new (GdkAtom *, ret_nitems);
+ GdkAtom *ret_atoms = g_new (GdkAtom, ret_nitems);
Atom *xatoms = (Atom *)ret_data;
data = (guchar *)ret_atoms;
Index: gdk/x11/gdkwindow-x11.c
===================================================================
RCS file: /cvs/gnome/gtk+/gdk/x11/gdkwindow-x11.c,v
retrieving revision 1.138
diff -p -u -r1.138 gdkwindow-x11.c
--- gdk/x11/gdkwindow-x11.c 2001/11/25 22:19:22 1.138
+++ gdk/x11/gdkwindow-x11.c 2001/12/13 20:36:29
@@ -4397,7 +4397,7 @@ create_moveresize_window (guint32 timest
FALSE,
GDK_BUTTON_RELEASE_MASK |
GDK_POINTER_MOTION_MASK,
- FALSE,
+ NULL,
NULL,
timestamp);
Index: gtk/gtkaccellabel.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkaccellabel.c,v
retrieving revision 1.38
diff -p -u -r1.38 gtkaccellabel.c
--- gtk/gtkaccellabel.c 2001/12/06 21:48:22 1.38
+++ gtk/gtkaccellabel.c 2001/12/13 20:36:29
@@ -484,7 +484,6 @@ gboolean
gtk_accel_label_refetch (GtkAccelLabel *accel_label)
{
GtkAccelLabelClass *class;
- gchar *utf8;
g_return_val_if_fail (GTK_IS_ACCEL_LABEL (accel_label), FALSE);
Index: gtk/gtklistitem.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtklistitem.c,v
retrieving revision 1.33
diff -p -u -r1.33 gtklistitem.c
--- gtk/gtklistitem.c 2001/12/04 03:27:28 1.33
+++ gtk/gtklistitem.c 2001/12/13 20:36:29
@@ -539,7 +539,6 @@ gtk_list_item_expose (GtkWidget *wi
GdkEventExpose *event)
{
GtkBin *bin;
- gint focus_width;
g_return_val_if_fail (widget != NULL, FALSE);
Index: gtk/gtktextiter.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtktextiter.c,v
retrieving revision 1.63
diff -p -u -r1.63 gtktextiter.c
--- gtk/gtktextiter.c 2001/11/29 20:09:41 1.63
+++ gtk/gtktextiter.c 2001/12/13 20:36:29
@@ -2109,7 +2109,7 @@ _gtk_text_iter_backward_indexable_segmen
* segment just before our current segment.
*/
g_assert (seg != real->segment);
- while (seg != real->segment)
+ do
{
prev_seg = seg;
prev_any_seg = any_seg;
@@ -2119,6 +2119,7 @@ _gtk_text_iter_backward_indexable_segmen
while (seg->char_count == 0)
seg = seg->next;
}
+ while (seg != real->segment)
g_assert (prev_seg != NULL);
g_assert (prev_any_seg != NULL);
===================================================================
-- Darin
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]