From: Florin Coras Date: Wed, 13 Mar 2024 00:00:51 +0000 (-0700) Subject: vcl: fix bitfield truncation with clang16 X-Git-Tag: v24.10-rc0~173 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F06%2F40506%2F3;p=vpp.git vcl: fix bitfield truncation with clang16 Reported by phlax while building Envoy with clang16 error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] Type: fix Signed-off-by: Florin Coras Change-Id: Ib1b731780cf27a9498299f0424a06000dc67e81e --- diff --git a/src/vcl/vcl_bapi.c b/src/vcl/vcl_bapi.c index 6071f646da4..42704f42c53 100644 --- a/src/vcl/vcl_bapi.c +++ b/src/vcl/vcl_bapi.c @@ -309,7 +309,7 @@ vcl_bapi_hookup (void) .endian = vl_api_##n##_t_endian, \ .format_fn = vl_api_##n##_t_format, \ .size = sizeof (vl_api_##n##_t), \ - .traced = 1, \ + .traced = (u32) 1, \ .tojson = vl_api_##n##_t_tojson, \ .fromjson = vl_api_##n##_t_fromjson, \ .calc_size = vl_api_##n##_t_calc_size, \