Bug#584474: FTBFS: usbms.c:315: error: format ‘%02x’ expects type ‘unsigned int’

sean finney seanius at debian.org
Thu Jun 3 19:27:38 UTC 2010


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-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 911_usbms_ftbfs.diff
Type: text/x-c
Size: 846 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-grub-devel/attachments/20100603/4928f9e6/attachment-0001.bin>


More information about the Pkg-grub-devel mailing list