grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] UUID support for UFS


From: Pavel Roskin
Subject: Re: [PATCH] UUID support for UFS
Date: Tue, 21 Jul 2009 20:20:17 -0400

On Tue, 2009-07-21 at 23:34 +0200, Javier Martín wrote:

> > If int and int32_t are different types, gcc will warn about it, at least
> > for implicit conversion with data loss.
> Oh, yes... with the current build system and without -Werror, warnings 
> are _very_ visible. </sarcasm>

I just use
make >/dev/null

>  Besides, do we really have -Wconversion 
> enabled?

No.  Have you actually tried it?  It finds some interesting stuff.  For
instance, the return value of grub_file_seek().

We can clean whatever -Wconversion finds.  That may find some real bugs
and it will prepare us to supporting new architectures.

>  I don't know, but gcc tends to be quite silent when it comes to 
> type conversion, mainly due to the laxitude it's used in *nix C 
> programs. The cast in that code was all but implicit, and explicit casts 
> tend to shut the compiler up.

However, we are not adding support for architectures with non-32-bit int
type right now.  Things may improve by the time we start that effort.
New format specifiers can appear to deal with 32-bit numbers.

> > It's more likely that bugs will be introduced by that change, not fixed.
> > Besides, the code will be harder to read.
> You say it'd be harder to read because the macros are newly-introduced 
> (C99) and thus not widely know. However, they are pretty clear and 
> self-explanatory once you google them the first time... and at the very 
> least they call attention to themselves: an unknowing programmer would 
> wonder what they are. Using a "normal" print specifier and a type cast 
> does not.

OK, if you can do it if you want.  It would be great if you fix some
real bugs in process.

-- 
Regards,
Pavel Roskin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]