gboolean: gint vs guint and more



Hola.

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 (...)

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

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

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

gtk_widget_set_sensitive()
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 7.2.1.3m, and it doesn't work at all with mipspro cc
7.3. Works with egcs 2.91.66. (timing problem or such?)

/Tomas
-- 
Tomas Ögren, stric@ing.umu.se, http://www.ing.umu.se/~stric/
|- Student at Computing Science, University of Umeå
`- Sysadmin at {cs,ing,acc}.umu.se



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