Re: Some warnings in GLib 2.24 (gutils.h and gthread.h)

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

 



On Fri, 2010-04-23 at 16:32 +0200, José Luis García Pallero wrote:
> 2010/4/23 Emmanuele Bassi <ebassi@xxxxxxxxx>:
> >> /usr/include/glib-2.0/glib/gutils.h: In function ‘g_bit_storage’:
> >> /usr/include/glib-2.0/glib/gutils.h:358: warning: conversion to
> >> ‘guint’ from ‘int’ may change the sign of the result
> >> /usr/include/glib-2.0/glib/gthread.h: In function ‘g_once_init_enter’:
> >> /usr/include/glib-2.0/glib/gthread.h:348: warning: cast discards
> >> qualifiers from pointer target type
> >>
> >> I suppose that they can be easy to fix in next release.
> >
> > there's nothing here to fix; if you enable pedantic warnings you get
> > exactly what you asked for.
> 
> But, is not important a warning about conversion from signed to
> unsigned data? Fix it is only an explicit cast.

1. if you "fix" by casting you just silenced the compiler and nothing
else; the underlying issue is a false positive.

2. adding casts doesn't make the code more readable or maintainable.

as I said, there's nothing to fix here: just gcc being overly pedantic,
as you requested.

ciao,
 Emmanuele.

-- 
W: http://www.emmanuelebassi.name
B: http://blogs.gnome.org/ebassi

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list


[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux