[prev in list] [next in list] [prev in thread] [next in thread]
List: gtk
Subject: Re: Some warnings in GLib 2.24 (gutils.h and gthread.h)
From: Emmanuele Bassi <ebassi () gmail ! com>
Date: 2010-04-23 14:51:13
Message-ID: 1272034273.2444.11.camel () gambit
[Download RAW message or body]
On Fri, 2010-04-23 at 16:32 +0200, José Luis García Pallero wrote:
> 2010/4/23 Emmanuele Bassi <ebassi@gmail.com>:
> >> /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@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic