From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LuDJw-0000Lk-5g for mharc-grub-devel@gnu.org; Wed, 15 Apr 2009 18:11:04 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LuDJt-0000La-HE for grub-devel@gnu.org; Wed, 15 Apr 2009 18:11:01 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LuDJo-0000L3-73 for grub-devel@gnu.org; Wed, 15 Apr 2009 18:11:01 -0400 Received: from [199.232.76.173] (port=45268 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LuDJo-0000L0-1e for grub-devel@gnu.org; Wed, 15 Apr 2009 18:10:56 -0400 Received: from c60.cesmail.net ([216.154.195.49]:44611) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1LuDJn-00050u-DJ for grub-devel@gnu.org; Wed, 15 Apr 2009 18:10:55 -0400 Received: from unknown (HELO smtprelay2.cesmail.net) ([192.168.1.112]) by c60.cesmail.net with ESMTP; 15 Apr 2009 18:10:55 -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 7997234C6A for ; Wed, 15 Apr 2009 18:12:33 -0400 (EDT) From: Pavel Roskin To: grub-devel@gnu.org Content-Type: text/plain Date: Wed, 15 Apr 2009 18:10:53 -0400 Message-Id: <1239833453.8204.18.camel@mj> Mime-Version: 1.0 X-Mailer: Evolution 2.24.5 (2.24.5-1.fc10) Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Code quality 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, 15 Apr 2009 22:11:02 -0000 Hello! It seems to me that the code quality has decreased in the last weeks. In the same time, we have a growing number of compiler warnings. It looks like there is a relationship between the two. I'll appreciate if everybody who recently contributed to GRUB looks at the remaining warnings and fixes at least some of them. I don't mean hiding the warnings, e.g. adding casts where using different types would be more appropriate or initializing variables gcc claims to be uninitialized without making sure that gcc is indeed wrong. But if there is a good fix, it should be applied. That's the warnings for the default configuration when compiled on x86_64: kern/i386/pc/init.c: In function 'grub_machine_fini': kern/i386/pc/init.c:226: warning: implicit declaration of function 'grub_stop_floppy' loader/i386/linux.c: In function 'hook': loader/i386/linux.c:234: warning: cast to pointer from integer of different size loader/i386/linux.c: In function 'grub_linux_setup_video': loader/i386/linux.c:303: warning: assignment makes integer from pointer without a cast loader/i386/pc/multiboot2.c: In function 'grub_mb2_arch_boot': loader/i386/pc/multiboot2.c:76: warning: implicit declaration of function 'grub_multiboot2_real_boot' loader/multiboot_loader.c: In function 'grub_cmd_multiboot_loader': loader/multiboot_loader.c:159: warning: 'return' with no value, in function returning non-void loader/i386/multiboot.c: In function 'grub_multiboot': loader/i386/multiboot.c:324: warning: assignment makes integer from pointer without a cast disk/ata.c: In function 'grub_ata_initialize': disk/ata.c:471: warning: passing argument 1 of 'grub_pci_iterate' from incompatible pointer type bus/usb/usbtrans.c: In function 'grub_usb_control_msg': bus/usb/usbtrans.c:94: warning: comparison between signed and unsigned bus/usb/usbtrans.c:94: warning: signed and unsigned type in conditional expression commands/lspci.c: In function 'grub_cmd_lspci': commands/lspci.c:153: warning: passing argument 1 of 'grub_pci_iterate' from incompatible pointer type bus/usb/ohci.c: In function 'grub_ohci_inithw': bus/usb/ohci.c:205: warning: passing argument 1 of 'grub_pci_iterate' from incompatible pointer type bus/usb/ohci.c: In function 'grub_ohci_transaction': bus/usb/ohci.c:235: warning: format '%02x' expects type 'unsigned int', but argument 5 has type 'grub_ohci_td_t' bus/usb/ohci.c: In function 'grub_ohci_transfer': bus/usb/ohci.c:297: warning: format '%08x' expects type 'unsigned int', but argument 5 has type 'grub_ohci_td_t' bus/usb/uhci.c: In function 'grub_uhci_inithw': bus/usb/uhci.c:305: warning: passing argument 1 of 'grub_pci_iterate' from incompatible pointer type fs/i386/pc/pxe.c:259: warning: initialization from incompatible pointer type disk/raid6_recover.c: In function 'grub_raid6_recover': disk/raid6_recover.c:95: warning: 'err[0]' may be used uninitialized in this function disk/raid6_recover.c:95: warning: 'err[1]' may be used uninitialized in this function I'm especially concerned about "'return' with no value, in function returning non-void". That's a sure way to get unpredictable behavior. Also, more testing would be great. At least please test the functionality you changed recently. -- Regards, Pavel Roskin