]> git.proxmox.com Git - mirror_ovs.git/commitdiff
travis: Disable check for array of flexible structures in sparse.
authorIlya Maximets <i.maximets@ovn.org>
Wed, 7 Oct 2020 13:23:49 +0000 (15:23 +0200)
committerIlya Maximets <i.maximets@ovn.org>
Thu, 8 Oct 2020 16:09:43 +0000 (18:09 +0200)
Sparse introduced new checks for flexible arrays and there is a
false-positive in netdev-linux implementation right now that can not
be easily fixed.  Patch sent to sparse to fix it, but we need to
disable the check for now to unblock our CI.

  lib/netdev-linux.c:1238:19: error: array of flexible structures

The issue is with the following code:

  union {
      struct cmsghdr cmsg;
      char buffer[CMSG_SPACE(sizeof(struct tpacket_auxdata))];
  } cmsg_buffers[NETDEV_MAX_BURST];

'struct cmsghdr' contains a flexible array.  But this union is a way
to ensure correct alignment of 'buffer', suggested by CMSG manpage.

Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
.travis/linux-build.sh

index 6981d1d475b9f3b52c66ea18acb21468672b1443..6b6935794af1936ebbfb5090a40694ddadee0f54 100755 (executable)
@@ -4,7 +4,7 @@ set -o errexit
 set -x
 
 CFLAGS_FOR_OVS="-g -O2"
-SPARSE_FLAGS=""
+SPARSE_FLAGS="-Wno-flexible-array-array"
 EXTRA_OPTS="--enable-Werror"
 
 function install_kernel()