On Wed, Dec 17, 2014 at 01:55:20PM +0100, Olivier Matz wrote: > This series are compilation fixes seen with clang-3.5 on linux. > > Olivier Matz (5): > test-devargs: fix misplaced braces in strncmp call > examples/l3fwd: fix compilation with clang 3.5 > examples/netmap: fix overflow in ioctl operation > examples/vm_power_manager: move -lvirt in LDLIBS > examples/vm_power_manager: fix initialization of cmdline token > > app/test/test_devargs.c | 2 +- > examples/l3fwd/main.c | 4 +++- > examples/netmap_compat/lib/compat_netmap.c | 2 +- > examples/netmap_compat/lib/compat_netmap.h | 2 +- > examples/vm_power_manager/Makefile | 4 +++- > examples/vm_power_manager/vm_power_cli.c | 2 +- > 6 files changed, 10 insertions(+), 6 deletions(-) > > -- > 2.1.3 >
Interesting. I've just upgraded to Fedora 21, and I'm getting a lot of other, different errors on compilation using its version of clang (3.4.2). Patches soon to follow, but I'm surprised that they don't show up in clang 3.5. Perhaps they are just compiler bugs in the Fedora version. Examples of the errors are shown below. /Bruce CC cmdline_rdline.o /home/bruce/dpdk.org/lib/librte_cmdline/cmdline_rdline.c:249:27: fatal error: equality comparison with extraneous parentheses [-Wparentheses-equality] if (((&rdl->left)->len == 0)) ~~~~~~~~~~~~~~~~~~^~~~ /home/bruce/dpdk.org/lib/librte_cmdline/cmdline_rdline.c:249:27: note: remove extraneous parentheses around the comparison to silence this warning if (((&rdl->left)->len == 0)) ~ ^ ~ /home/bruce/dpdk.org/lib/librte_cmdline/cmdline_rdline.c:249:27: note: use '=' to turn this equality comparison into an assignment if (((&rdl->left)->len == 0)) ^~ = 1 error generated. CC eal.o clang: fatal error: argument unused during compilation: '-I /home/bruce/dpdk.org/x86_64-native-linuxap /home/bruce/dpdk.org/mk/internal/rte.compile-pre.mk:126: recipe for target 'eal.o' failed gmake[7]: *** [eal.o] Error 1