passt: Fix build with gcc 7, use std=c99, enable some more Clang checkers

Unions and structs, you all have names now.

Take the chance to enable bugprone-reserved-identifier,
cert-dcl37-c, and cert-dcl51-cpp checkers in clang-tidy.

Provide a ffsl() weak declaration using gcc built-in.

Start reordering includes, but that's not enough for the
llvm-include-order checker yet.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio
2021-10-21 04:26:08 +02:00
parent 6257a2752e
commit dd942eaa48
24 changed files with 300 additions and 284 deletions

View File

@@ -46,12 +46,11 @@
* See the comment to csum_avx2() for further details.
*/
#include <stdint.h>
#include <stddef.h>
#include <linux/ip.h>
#include <linux/tcp.h>
#include <linux/udp.h>
#include <arpa/inet.h>
#include <netinet/ip.h>
#include <netinet/tcp.h>
#include <stddef.h>
#include <stdint.h>
/**
* sum_16b() - Calculate sum of 16-bit words