From ac3b1139578b544cae3884548f455a1e7b4910f4 Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Sat, 30 Mar 2019 10:24:28 -0400 Subject: VPP-1576: fix a class of spurious warnings Change-Id: I52198e97397bb6f3b5c0c30c44aac34c17650d4d Signed-off-by: Dave Barach --- src/vppinfra/format.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/vppinfra') diff --git a/src/vppinfra/format.c b/src/vppinfra/format.c index 072ff3b3362..cb6cb455eaa 100644 --- a/src/vppinfra/format.c +++ b/src/vppinfra/format.c @@ -412,6 +412,11 @@ va_format (u8 * s, const char *fmt, va_list * va) if (f > g) vec_add (s, g, f - g); +#ifdef __COVERITY__ + if (s == 0) + return (u8 *) "liar liar pants on fire s can't be zero!"; +#endif + return s; } -- cgit 1.2.3-korg