All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Javier Martín" <lordhabbit@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] UUID support for UFS
Date: Tue, 21 Jul 2009 23:34:42 +0200	[thread overview]
Message-ID: <4A663472.5090205@gmail.com> (raw)
In-Reply-To: <1248215855.18091.32.camel@mj>

Pavel Roskin escribió:
> On Tue, 2009-07-21 at 22:14 +0200, Javier Martín wrote:
> 
>>> But I would prefer that we work on fixing bugs rather than non-bugs.
>>>
>> "Fixing" this would allow us to have cleaner code, and separate "casual 
>> variables" from fixed-length variables. If we print int with %d and 
>> int32_t with PRId32, the impact of the subtle bugs that appear when we 
>> port across architectures will be reduced.
> 
> 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> Besides, do we really have -Wconversion 
enabled? 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.

> 
> 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.



  reply	other threads:[~2009-07-21 23:34 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 [this message]
2009-07-22  0:20                   ` Pavel Roskin
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=4A663472.5090205@gmail.com \
    --to=lordhabbit@gmail.com \
    --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.