From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MTPZc-00025W-4S for mharc-grub-devel@gnu.org; Tue, 21 Jul 2009 20:20:44 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MTPZa-00025R-QW for grub-devel@gnu.org; Tue, 21 Jul 2009 20:20:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MTPZW-00021C-VX for grub-devel@gnu.org; Tue, 21 Jul 2009 20:20:42 -0400 Received: from [199.232.76.173] (port=54279 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTPZW-00020z-Ro for grub-devel@gnu.org; Tue, 21 Jul 2009 20:20:38 -0400 Received: from c60.cesmail.net ([216.154.195.49]:44867) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1MTPZW-0004qC-8W for grub-devel@gnu.org; Tue, 21 Jul 2009 20:20:38 -0400 Received: from unknown (HELO smtprelay2.cesmail.net) ([192.168.1.112]) by c60.cesmail.net with ESMTP; 21 Jul 2009 20:20:19 -0400 Received: from [192.168.0.22] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by smtprelay2.cesmail.net (Postfix) with ESMTPSA id 03C3A34C6A for ; Tue, 21 Jul 2009 20:30:45 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: <4A663472.5090205@gmail.com> References: <1248196443.27068.86.camel@mj> <4A660CE9.6040104@gmail.com> <1248211910.18091.8.camel@mj> <1248213902.18091.20.camel@mj> <4A66218A.3020506@gmail.com> <1248215855.18091.32.camel@mj> <4A663472.5090205@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" Date: Tue, 21 Jul 2009 20:20:17 -0400 Message-Id: <1248222017.752.11.camel@mj> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 (2.26.3-1.fc11) Content-Transfer-Encoding: 8bit X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH] UUID support for UFS X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Jul 2009 00:20:43 -0000 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. 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