Subject: powerpc-utils: Sign problem in nvsetvol.
Package: powerpc-utils
Version: 1.1.3-17
Severity: normal
Hi,
nvsetvol uses a parameter between 0 and 255.
nvsetvol.c, line 106:
printf("new volume is %d\n", buf[VOLADDR]);
But buf is a char* and the compilation line uses -fsigned-char.
If the value is >127, then a negative number is printed. See this
thread
http://groups.google.com/group/linux.debian.ports.powerpc/browse_thread/thread/47191ed3d5482c23/de8c0289022cdad6?lnk=st&q=debian+powerpc+nvsetvol&rnum=1&hl=en#de8c0289022cdad6
Patch : replace the above line with:
printf("new volume is %d\n", (unsigned char)buf[VOLADDR]);
(or compile without -fsigned-char switch).
The same problem appears on line 98, do the same to fix it.
Thanks,
Eugen
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable')
Architecture: powerpc (ppc)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-1-powerpc
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]