Source: grub2 Version: 1.98+20100602-1 Severity: serious Tags: upstream patch Justification: FTBFS
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 while investigated an unrelated bug, i noticed that the latest snapshot uploaded to debian fails with the following error: gcc-4.4 -Idisk -I/home/seanius/grub2-1.98+20100602/disk -I/home/seanius/grub2-1.98+20100602/include -I. -I./include -Wall -W -ffreestanding -Os -DGRUB_MACHINE_EMU=1 -DMACHINE=X86_64_EMU -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes -Wundef -Wstrict-prototypes -g -fno-dwarf2-cfi-asm -m64 -fno-stack-protector -mno-stack-arg-probe -Werror -DGRUB_TARGET_NO_MODULES=1 -DUSE_ASCII_FAILBACK=1 -DGRUB_FILE=\"disk/usbms.c\" -MD -c -o usbms_mod-disk_usbms.o /home/seanius/grub2-1.98+20100602/disk/usbms.c cc1: warnings being treated as errors /home/seanius/grub2-1.98+20100602/disk/usbms.c: In function ‘grub_usbms_transfer’: /home/seanius/grub2-1.98+20100602/disk/usbms.c:315: error: format ‘%02x’ expects type ‘unsigned int’, but argument 5 has type ‘grub_size_t’ /home/seanius/grub2-1.98+20100602/disk/usbms.c:333: error: format ‘%02x’ expects type ‘unsigned int’, but argument 5 has type ‘grub_size_t’ make[1]: *** [usbms_mod-disk_usbms.o] Error 1 the two lines in question are both debug printf type statements. therefore, instead of doing something complicated to get the format string to match with the size of grub_size_t (which i'm guessing could vary based on the platform), i have created a patch that simply casts the parameter in question as unsigned to match the format string instead (which only shows two digits anyway). sean - -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.34-rc5minime-00783-gbad884d (SMP w/2 CPU cores) Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iD4DBQFMCAImynjLPm522B0RAsldAJjTMs+9qU0jot0h06FdvMFG8nQCAJ0f0c0X Fu2Hnjr1OrS/XiOazgU1bQ== =+y8T -----END PGP SIGNATURE-----
--- grub2-1.98+20100602.orig/disk/usbms.c +++ grub2-1.98+20100602/disk/usbms.c @@ -312,7 +312,7 @@ grub_usbms_transfer (struct grub_scsi *s grub_dprintf ("usb", "buf:\n"); if (size <= 64) for (i=0; i<size; i++) - grub_dprintf ("usb", "0x%02x: 0x%02x\n", i, buf[i]); + grub_dprintf ("usb", "0x%02x: 0x%02x\n", (unsigned)i, buf[i]); else grub_dprintf ("usb", "Too much data for debug print...\n"); } @@ -330,7 +330,7 @@ grub_usbms_transfer (struct grub_scsi *s /* Debug print of sent data. */ if (size <= 256) for (i=0; i<size; i++) - grub_dprintf ("usb", "0x%02x: 0x%02x\n", i, buf[i]); + grub_dprintf ("usb", "0x%02x: 0x%02x\n", (unsigned)i, buf[i]); else grub_dprintf ("usb", "Too much data for debug print...\n"); }