From 790d882927863e287bbeff38261d98e9cb16797a Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Wed, 19 Dec 2018 21:11:59 +0000 Subject: ping: fix warning when compiled with USE_CRYPTO=none Following warning is false positive, niquery_option_subject_name_handler() calls error() that terminates the program - but compiler does not know that because error() can be called non-terminating way. So lets a call to abort() that will terminate, and cause core as a sign of bug if error() ever falls through. ping6_common.c:494:1: warning: control reaches end of non-void function [-Wreturn-type] Signed-off-by: Sami Kerola --- ping6_common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ping6_common.c b/ping6_common.c index daccf71..4908af6 100644 --- a/ping6_common.c +++ b/ping6_common.c @@ -491,6 +491,7 @@ static int niquery_option_subject_name_handler(int index __attribute__((__unused const char *name __attribute__((__unused__))) { error(3, ENOSYS, _("niquery_option_subject_name_handler() crypto disabled")); + abort(); } #endif -- cgit v1.2.1