All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] UUID support for UFS
Date: Tue, 21 Jul 2009 20:20:17 -0400	[thread overview]
Message-ID: <1248222017.752.11.camel@mj> (raw)
In-Reply-To: <4A663472.5090205@gmail.com>

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	other threads:[~2009-07-22  0:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-21 13:03 [PATCH] UUID support for UFS Vladimir 'phcoder' Serbinenko
2009-07-21 17:14 ` Pavel Roskin
2009-07-21 20:01   ` Vladimir 'phcoder' Serbinenko
2009-07-21 18:46     ` Javier Martín
2009-07-21 21:31       ` Pavel Roskin
2009-07-21 21:45         ` Vladimir 'phcoder' Serbinenko
2009-07-21 22:05           ` Pavel Roskin
2009-07-21 20:14             ` Javier Martín
2009-07-21 22:37               ` Pavel Roskin
2009-07-21 21:34                 ` Javier Martín
2009-07-22  0:20                   ` Pavel Roskin [this message]
2009-07-22 17:47                   ` Robert Millan
2009-07-22 18:02                     ` Javier Martín
2009-07-22 17:44           ` Robert Millan
2009-07-21 20:04     ` Pavel Roskin
2009-07-22 17:40 ` Robert Millan
2009-07-22 17:47   ` Vladimir 'phcoder' Serbinenko
2009-07-22 18:01   ` Pavel Roskin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1248222017.752.11.camel@mj \
    --to=proski@gnu.org \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.