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 <bganne@cisco.com>
diff --git a/src/vppinfra/random_buffer.h b/src/vppinfra/random_buffer.h
index eb31854..320394d 100644
--- a/src/vppinfra/random_buffer.h
+++ b/src/vppinfra/random_buffer.h
@@ -40,6 +40,11 @@
 
 #include <vppinfra/clib.h>
 #include <vppinfra/random_isaac.h>
+#include <vppinfra/warnings.h>
+
+/* *INDENT-OFF* */
+WARN_OFF(array-bounds)
+/* *INDENT-ON* */
 
 typedef struct
 {
@@ -107,6 +112,10 @@
     return b->buffer + i;
 }
 
+/* *INDENT-OFF* */
+WARN_ON(array-bounds)
+/* *INDENT-ON* */
+
 #endif /* included_clib_random_buffer_h */
 
 /*