gboolean: gint vs guint and more


While searching for a dnd bug in gtk when compiling with mipspro cc on
irix, I found that mipspro was warning g[dt]k for it's usage of gboolean
(signed gint) in bitfields. Then I tried changing gboolean to guint
which brought up some errors in g[dt]k.

A few functions in g[dt]k are prototyped as returning or taking
gboolean, but the actual function definition uses gint. This is bad IMO.

gdk_colors_alloc() gdk_color_parse()
gdk_color_alloc() gdk_color_change()
gdk.h: gint funcname (...)
gdkcolor.c: gboolean funcname (...)

gtkclist.h: void funcname (GtkCList *, gint, gboolean resizable)
gtkclist.c: void funcname (GtkCList *, gint, gint resizable)

gtknotebook.h: void funcname (GtkNotebook *, gboolean show_border)
gtknotebook.c: void funcname (GtkNotebook *, gint show_border)

gtknotebook.h: void funcname (GtkNotebook *, gboolean scrollable)
gtknotebook.c: void funcname (GtkNotebook *, gint scrollable)

gtkwidget.h: void funcname (GtkWidget *, gboolean sensitive)
gtkwidget.c: void funcname (GtkWidget *, gint sensitive)

_GtkDragDestSite in gtkdnd.c has gboolean:1 (signed gint) members, which
is also bad IMO.. mipspro cc complains about it as well.

Dragging in dnd does not work if I enable any optimization on gtkdnd.c
with mipspro cc, and it doesn't work at all with mipspro cc
7.3. Works with egcs 2.91.66. (timing problem or such?)

Tomas ÷gren,,
|- Student at Computing Science, University of UmeŚ
`- Sysadmin at {cs,ing,acc}

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