diff options
author | Damjan Marion <damarion@cisco.com> | 2021-04-14 18:48:22 +0200 |
---|---|---|
committer | Damjan Marion <damarion@cisco.com> | 2021-04-14 18:48:24 +0200 |
commit | d22f1906e7f1800bcef072357bd8d7d20143f64b (patch) | |
tree | 40903499b1c0a1e56a0b1c21b02e8d31e447cd7a /src | |
parent | 04ae8273f64a4f5a771da9b056bcccd1ebf9c7d9 (diff) |
misc: clang-12 support
Type: improvement
Change-Id: Ie8ebbbcf5e93337036998d6ba8dac393b20ebc72
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 10 | ||||
-rw-r--r-- | src/vnet/fib/fib_entry_src.h | 8 |
2 files changed, 11 insertions, 7 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4d66671edc5..eb598784cb8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -13,7 +13,15 @@ cmake_minimum_required(VERSION 3.10) -set(CMAKE_C_COMPILER_NAMES clang-11 clang-10 clang-9 gcc-10 gcc-9 cc) +set(CMAKE_C_COMPILER_NAMES + clang-12 + clang-11 + clang-10 + clang-9 + gcc-10 + gcc-9 + cc +) project(vpp C) diff --git a/src/vnet/fib/fib_entry_src.h b/src/vnet/fib/fib_entry_src.h index 248cf6c4079..ced6b5c42fc 100644 --- a/src/vnet/fib/fib_entry_src.h +++ b/src/vnet/fib/fib_entry_src.h @@ -248,12 +248,8 @@ typedef struct fib_entry_src_vft_t_ { } \ } -#define FIB_ENTRY_SRC_VFT_EXISTS(esrc, func) \ -{ \ - const fib_entry_src_vft_t *_vft; \ - _vft = fib_entry_src_get_vft(esrc); \ - (_vft->func); \ -} +#define FIB_ENTRY_SRC_VFT_EXISTS(esrc, func) \ + (fib_entry_src_get_vft(esrc)->func != 0) extern const fib_entry_src_vft_t*fib_entry_src_get_vft( const fib_entry_src_t *esrc); |