On Thu, Mar 31, 2016 at 10:45:35PM -0400, Ben Warren wrote: > > > On Mar 30, 2016, at 4:33 PM, Ben Pfaff <b...@ovn.org> wrote: > > > > On Fri, Mar 25, 2016 at 02:10:27PM -0700, b...@skyportsystems.com wrote: > >> From: Ben Warren <b...@skyportsystems.com> > >> > >> Removed from redundant #includes and moved some macros to different file > >> scope > >> > >> Signed-off-by: Ben Warren <b...@skyportsystems.com> > >> Acked-by: Ryan Moats <rmo...@us.ibm.com> > > > > With this applied I get pervasive warnings like this: > > > > /usr/lib/gcc/i586-linux-gnu/4.9//include/stdarg.h:51:9: warning: > > preprocessor token va_copy redefined > > ../lib/util.h:33:9: this was the original definition > > > > I think that probably this is due to defining va_copy before #including > > <stdarg.h>, but I haven't looked. > > > > I feel like it's a good idea to let the changes that I've already > > applied percolate through everyone's build systems, etc. for a while, so > > I'm going to leave off with this series for now. When you've had a > > chance to look at this problem, please post a v6. > > Hmmm, I get a clean build with this patch applied.
This turned out to be a warning from sparse, not from gcc, e.g.: blp@sigabrt:~/nicira/ovs/_build(0)$ cat tmp.c #define va_copy(dst, src) ((dst) = (src)) #include <stdarg.h> blp@sigabrt:~/nicira/ovs/_build(0)$ gcc -c tmp.c blp@sigabrt:~/nicira/ovs/_build(0)$ cgcc -c tmp.c /usr/lib/gcc/i586-linux-gnu/4.9//include/stdarg.h:51:9: warning: preprocessor token va_copy redefined tmp.c:1:9: this was the original definition blp@sigabrt:~/nicira/ovs/_build(0)$ I think that the easiest fix might be to delete this whole thing. All the compilers we care about these days have va_copy. So I sent out a patch to do that: http://openvswitch.org/pipermail/dev/2016-March/068998.html > I notice you’re using GCC 4.9, while mine is a bit older: > > ben@ben-lab-sc:~/workspace/ovs$ gcc --version > gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4 > Copyright (C) 2013 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > > ben@ben-lab-sc:~/workspace/ovs$ libtool --version > libtool (GNU libtool) 2.4.2 > > What distro, toolchain versions and Make targets do you recommend for > testing prior to patch submission? I’ll spin up the appropriate VM so > this is not an issue. GCC 4.8 is fine. Whatever you use, someone else will be using some other version. And then there are the Windows builds that are using MSVC. It's pointless to try to be perfect on all of them. As problems get reported, we iterate. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev