From d9ced40ab7bba90bbac0a5c1b8dca3bd741c845d Mon Sep 17 00:00:00 2001 From: Vincent JARDIN Date: Mon, 9 Oct 2017 13:07:50 +0200 Subject: [PATCH] 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 --- lib/ferr.c | 1 + 1 file changed, 1 insertion(+) 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); -- 2.39.5