Re: Ebtables Compile errors with gcc4

Bart De Schuymer <[email protected]>
Newsgroups gmane.linux.network.bridge.ebtables.user
Message-ID <[email protected]>
Op zo, 03-07-2005 te 15:56 -0500, schreef Michael L Owen:
> Running Make after this produces new error:
> 
> gcc -Wall -Wunused -Wno-pointer-sign -DPROGVERSION=\"2.0.6\" 
> -DPROGNAME=\"ebtables\" -DPROGDATE=\"November\ 2003\" 
> -D_PATH_ETHERTYPES=\"/etc/ethertypes\" -c -o ebtables.o ebtables.c 
> -Iinclude/
> ebtables.c: In function ?check_rule_exists?:
> ebtables.c:1174: error: label at end of compound statement
> make: *** [ebtables.o] Error 1
> 
> resulting from the use of empty label.
> Changing program from:
> 
> letscontinue:
>         }
>         return -1;
> }
> 
> to:
> 
> letscontinue:
> 	return -1;
>         }
>         return -1;
> }
> 
> makes the error go away, but I don't know if it is correct.

That's not correct, make it "letscontinue:;". Last time I'm answering
this question ;-)

> Third compile after this correction yields:
> 
> gcc -Wall -Wunused -Wno-pointer-sign -DPROGVERSION=\"2.0.6\" 
> -DPROGNAME=\"ebtables\" -DPROGDATE=\"November\ 2003\" 
> -D_PATH_ETHERTYPES=\"/etc/ethertypes\" -c -o extensions/ebt_ip.o 
> extensions/ebt_ip.c -Iinclude/
> extensions/ebt_ip.c: In function ?parse?:
> extensions/ebt_ip.c:316: error: invalid lvalue in assignment
> make: *** [extensions/ebt_ip.o] Error 1
> 
> This line appears to be casting the first digit from strtoul into an 
> unsigned
> char. I'm pretty much lost at this point as to how to fix it.
> 
> (unsigned char) i = strtoul(argv[optind - 1], &end, 10);

Remove the (unsigned char).

Both have been fixed long ago in CVS.

cheers,
Bart




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.