On Sat, 24 May 2014 21:33:59 +0200
Andreas Henriksson <andr...@fatal.se> wrote:

> Hello Michael, Stephen, ...
> 
> On Sat, May 24, 2014 at 04:09:43PM +0100, Michael Tautschnig wrote:
> > Package: iproute2
> > Version: 3.14.0-1
> > Usertags: goto-cc
> > 
> > During a rebuild of all packages in a clean sid chroot (and 
> > cowbuilder+pbuilder)
> > the build failed with the following error. Please note that we use our 
> > research
> > compiler tool-chain (using tools from the cbmc package), which permits 
> > extended
> > reporting on type inconsistencies at link time.
> > 
> > [...]
> > gcc   bridge.o fdb.o monitor.o link.o mdb.o vlan.o ../lib/libnetlink.a 
> > ../lib/libutil.a  ../lib/libnetlink.a ../lib/libutil.a -o bridge
> > file link.c line 18: error: conflicting types for variable "filter_index"
> > old definition in module fdb file fdb.c line 29
> > signed int
> > new definition in module link file link.c line 18
> > unsigned int
> > <builtin>: recipe for target 'bridge' failed
> > make[3]: *** [bridge] Error 64
> > make[3]: Leaving directory 
> > '/srv/jenkins-slave/workspace/sid-goto-cc-iproute2/iproute2-3.14.0/bridge'
> > Makefile:45: recipe for target 'all' failed
> > 
> > While practical constraints may limit the value of filter_index to remain 
> > within
> > the bounds of a positive signed int, there is certainly no such guarantee 
> > here.
> > Also, a plain majority vote suggests that this really just a wrong 
> > declaration
> > in link.c as several declarations of filter_index as signed int exist.
> 
> I'd suggest the opposite, the majority is wrong.
> 
> filter_index is assigned exclusively from if_nametoindex or ll_name_to_index
> which both return unsigned int.
> 
> Changing it to unsigned everywhere seems better.
> 
> Also, this should probably be static... right?
> 
> Attached an untested patch with both suggestions implemented.
> 
> Stephen, what do you think?
> 
> Regards,
> Andreas Henriksson

I think this looks good, when you validate it works I will apply it.


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to