summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSami Kerola <kerolasa@iki.fi>2018-12-19 21:11:59 +0000
committerSami Kerola <kerolasa@iki.fi>2018-12-19 21:11:59 +0000
commit790d882927863e287bbeff38261d98e9cb16797a (patch)
treeba345d6c4daf8c9b4a1114d8c6d37d7ae00e6de5
parent97d70aabecf412a95c65e1e22730a061ce3415cc (diff)
downloadiputils-790d882927863e287bbeff38261d98e9cb16797a.tar.gz
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 <kerolasa@iki.fi>
-rw-r--r--ping6_common.c1
1 files changed, 1 insertions, 0 deletions
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