[BusyBox] [patch] util-linux/fdisk.c:870: syntax error before "static"

Marc Kleine-Budde kleine-budde at gmx.de
Fri Nov 14 00:51:04 UTC 2003


Hi!

I just discoved an error in fdisk.c:

powerpc-uclibc-linux-gnu-gcc -I./include -Wall -Wstrict-prototypes
-Wshadow -Os -fomit-frame-pointer -D_GNU_SOURCE -DNDEBUG     -c -o
util-linux/fdisk.o util-linux/fdisk.c
util-linux/fdisk.c:870: syntax error before "static"
util-linux/fdisk.c:876: warning: type defaults to `int' in declaration
of `retval'
util-linux/fdisk.c:876: `f_d' undeclared here (not in a function)
util-linux/fdisk.c:876: `offset' undeclared here (not in a function)
util-linux/fdisk.c:877: `offset' undeclared here (not in a function)
util-linux/fdisk.c:878: `result' undeclared here (not in a function)
util-linux/fdisk.c:878: `origin' undeclared here (not in a function)
util-linux/fdisk.c:878: initializer element is not constant
util-linux/fdisk.c:878: warning: data definition has no type or storage
class
util-linux/fdisk.c:879: syntax error before "return"
util-linux/fdisk.c: In function `fdisk_llseek':
util-linux/fdisk.c:892: warning: implicit declaration of function
`my_llseek'
util-linux/fdisk.c: At top level:
util-linux/fdisk.c:868: warning: `_llseek' declared `static' but never
defined

I'm using busybox 1.00-pre3, but the buggy code is still in CVS.

The attached diff fixes it.

Marc
-- 
#!/bin/sh
set - `type $0` 'tr "[a-zA-Z]" "[n-za-mN-ZA-M]"';while [ "$2" != "" ];do \
shift;done; echo 'frq -a -rc '`echo "$0"| $1 `'>$UBZR/.`rpub signature|'`\
echo $1|$1`'`;rpub "Jr ner fvtangher bs obet. Erfvfgnapr vf shgvyr!"'|$1|sh
-------------- next part --------------
#
# fixes the following error in busybox-1.00-pre3
#
# PATH="/home/frogger/ptxdist/xchain/ppc-uclibc"/bin:$PATH make -C /home/frogger/projects/ptxdist/ptxdist-ppc-uclibc/build/busybox-1.00-pre3 CROSS="powerpc-uclibc-linux-gnu"- HOSTCC=gcc EXTRA_CFLAGS=''
# make[1]: Entering directory `/home/frogger/projects/ptxdist/ptxdist-ppc-uclibc/build/busybox-1.00-pre3'
# powerpc-uclibc-linux-gnu-gcc -I./include -Wall -Wstrict-prototypes -Wshadow -Os -fomit-frame-pointer -D_GNU_SOURCE -DNDEBUG     -c -o util-linux/fdisk.o util-linux/fdisk.c
# util-linux/fdisk.c:870: syntax error before "static"
# util-linux/fdisk.c:876: warning: type defaults to `int' in declaration of `retval'
# util-linux/fdisk.c:876: `f_d' undeclared here (not in a function)
# util-linux/fdisk.c:876: `offset' undeclared here (not in a function)
# util-linux/fdisk.c:877: `offset' undeclared here (not in a function)
# util-linux/fdisk.c:878: `result' undeclared here (not in a function)
# util-linux/fdisk.c:878: `origin' undeclared here (not in a function)
# util-linux/fdisk.c:878: initializer element is not constant
# util-linux/fdisk.c:878: warning: data definition has no type or storage class
# util-linux/fdisk.c:879: syntax error before "return"
# util-linux/fdisk.c: In function `fdisk_llseek':
# util-linux/fdisk.c:892: warning: implicit declaration of function `my_llseek'
# util-linux/fdisk.c: At top level:
# util-linux/fdisk.c:868: warning: `_llseek' declared `static' but never defined
# make[1]: *** [util-linux/fdisk.o] Error 1
# make[1]: Leaving directory `/home/frogger/projects/ptxdist/ptxdist-ppc-uclibc/build/busybox-1.00-pre3'
#
diff -ruN busybox-1.00-pre3-orig/util-linux/fdisk.c busybox-1.00-pre3/util-linux/fdisk.c
--- busybox-1.00-pre3-orig/util-linux/fdisk.c	Fri Aug  8 22:04:56 2003
+++ busybox-1.00-pre3/util-linux/fdisk.c	Fri Nov 14 01:36:33 2003
@@ -865,7 +865,7 @@
 
 static _syscall5(int,_llseek,unsigned int,f_d,unsigned long,offset_high,
 		 unsigned long, offset_low,fdisk_loff_t *,result,
-		 unsigned int, origin)
+		 unsigned int, origin);
 
 static fdisk_loff_t my_llseek (unsigned int f_d, fdisk_loff_t offset,
 		unsigned int origin)


More information about the busybox mailing list