From: Benoît Ganne Date: Fri, 24 Apr 2020 09:32:13 +0000 (+0200) Subject: vppinfra: selectively disable false-positive GCC-10 warnings X-Git-Tag: v20.09-rc0~127 X-Git-Url: https://gerrit.fd.io/r/gitweb?p=vpp.git;a=commitdiff_plain;h=ffbcf6178891bd68a97543ac91d28f37256d5e13 vppinfra: selectively disable false-positive GCC-10 warnings GCC-10 increase overflows-related warnings but failed to infer that b->n_cached_bytes is always < sizeof(uword). Type: fix Change-Id: I956ae609abc9e39d4a932e5801510999d7d27b79 Signed-off-by: Benoît Ganne --- diff --git a/src/vppinfra/random_buffer.h b/src/vppinfra/random_buffer.h index eb318548b0a..320394d1862 100644 --- a/src/vppinfra/random_buffer.h +++ b/src/vppinfra/random_buffer.h @@ -40,6 +40,11 @@ #include #include +#include + +/* *INDENT-OFF* */ +WARN_OFF(array-bounds) +/* *INDENT-ON* */ typedef struct { @@ -107,6 +112,10 @@ clib_random_buffer_get_data (clib_random_buffer_t * b, uword n_bytes) return b->buffer + i; } +/* *INDENT-OFF* */ +WARN_ON(array-bounds) +/* *INDENT-ON* */ + #endif /* included_clib_random_buffer_h */ /*