gtk+-0.99.5 bug report



Here are some of the bugs I found in gtk+-0.99.5 in digest format

----------

Subject: bug #1: gdkwindow.c, lines 65 and 80; lines 113 and 123.

i is an declared an unsigned int in line 65 and 113, but is tested in
line 80 and 123 for >= 0, which is *always* true for unsigned variables.
Only a bug in gcc allows this to work.

Fix:

Declare i as an int.

----------

Subject: bug #2: gdkwindow.c, lines 1724 and 1735.

wm_hints is declared as a local stack variable but not initialized to zero.
Using |= in line 1735 makes no sense, because the value can be anything
before the or is done.

Fix:

Use "bzero(&wm_hints,sizeof(wm_hints));" before the or.

----------

Subject: bug #3: gtk/Makefile and gdk/Makefile

The makefiles has dependencies that won't work with most versions of
make. "$(top_builddir)/gtk/libgtk.la" resolves to "../gtk/libgtk.la"
for which there is no makefile rule.  There is one for "libgtk.la",
but make on most systems isn't smart enough to handle path resolving
on the left hand side of a dependancy.

Fix:

Remove "$(top_builddir)/gtk" and "../gtk/" everywhere in gtk/Makefile,
and "$(top_builddir)/gdk" in gdk/Makefile.

----------

Subject: bug #4: gtkclist.h, lines 181, 195 and 196

Also:
gtkhandlebox.h, lines 53, 54 and 55
gtktooltips.h, lines 61 and 62

gint is signed, and a bitfield of width 1 is declared.
A bitfield of width 1 will not have room for the sign bit, and will
become negative just by being set.

Fix:

Change from gint to guint.

----------

Subject: bug #5, gtkclist.c, lines 1401 and 1405

Typecasting the lvalue in assignments is not permitted under ANSI C,
and will give errors when compiling with anything stricter than gcc.

Fix:

Change the (gint) typecast on the right hand side, and remove the
left hand side typecast:

list->data = (gpointer)((gint) list->data + 1);

list->data = (gpointer)((gint) list->data - 1);

Note that this assumes that pointers are the same size as ints, which
is a *bad* *bad* *bad* assumption.

----------

Subject: bug #6: gtkentry.c, line 1582; gtkeditable.h, line 45

editable->current_pos is declared unsigned, but checked whether it is
negative.

Fix:

Change current_pos in gtkeditable.h from guint to gint.

----------

Subject: bug #7: gtktext.c, lines 606 and 610

index is declared as unsigned in line 606, but compared for >= 0 in
line 610.

Fix:

Remove pointless comparision from line 610

----------

Subject: bug #8: gtktext.c, lines 825 and 832

The pointer text is allocated from the stack in line 825, but not given
a value before being taken the length of in line 832.

Fix:

Move the test for end_pos < 0 down a few lines to after text is set.

----------

End of digest
*************

Hope these bug report can be of some value.
Keep up the work.

--
*Art



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]