From: Vincent JARDIN Date: Mon, 9 Oct 2017 11:07:50 +0000 (+0200) Subject: lib: fix wrong warning from clang X-Git-Tag: frr-4.0-dev~230^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=d9ced40ab7bba90bbac0a5c1b8dca3bd741c845d;p=mirror%2Ffrr.git lib: fix wrong warning from clang The compiler cannot guess that rise() will not return here. One should help. Warning: Access to field 'file' results in a dereference of a null pointer (loaded from variable 'error') aka error->file while error is NULL. Signed-off-by: Vincent Jardin --- diff --git a/lib/ferr.c b/lib/ferr.c index 2a039d2089..69aeb3db40 100644 --- a/lib/ferr.c +++ b/lib/ferr.c @@ -74,6 +74,7 @@ static ferr_r ferr_set_va(const char *file, int line, const char *func, /* we're screwed */ zlog_err("out of memory while allocating error info"); raise(SIGSEGV); + abort(); /* raise() can return, but raise(SIGSEGV) shall not */ } pthread_setspecific(errkey, error);