[Geany] [PATCH] Fixes for warnings and portability
Jeff Pohlmeyer
yetanothergeek at xxxxx
Fri Feb 22 18:37:04 UTC 2008
On Fri, Feb 22, 2008 at 12:27 PM, Daniel Richard G. <skunk at iskunk.org> wrote:
> On Fri, 2008 Feb 22 08:19:44 -0600, Jeff Pohlmeyer wrote:
> > I managed to get everything cleaned up, with the exception of the
> > -Wconversion flag. As far as I can tell, there is absolutely no way
> > to use that flag with e.g. gtk_misc_set_alignment() without getting
> > a warning.
>
> Well, there it would just be a matter of casting the (presumably integer)
> second and third arguments to float. Though I'd agree that doing this sort
> of thing every time the warning arises is overkill.
Nope, even typecasting doesn't work. I don't think there is any possible
way to workaround that warning.
For example, try compiling this with -Wconversion :
static void foo(float x)
{
}
int main(int argc, char *argv[])
{
foo((float) 0.0f);
return 0;
}
Crazy, isn't it?
- Jeff
More information about the Users
mailing list