From f10889de7c28b6da1b2c7a384f2099529be579ac Mon Sep 17 00:00:00 2001 From: kn Date: Fri, 26 Aug 2022 00:02:08 +0000 Subject: [PATCH] Move (unused) functions under !SMALL if_state_name() and proposal_state_name() are only uesd in log_debug() calls which are NOOPs in SMALL builds. Seen with -Wunused-function warnings in distrib/special/slaacd. OK deraadt --- sbin/slaacd/engine.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sbin/slaacd/engine.c b/sbin/slaacd/engine.c index 6d0eed75dd3..7ca00650ecf 100644 --- a/sbin/slaacd/engine.c +++ b/sbin/slaacd/engine.c @@ -1,4 +1,4 @@ -/* $OpenBSD: engine.c,v 1.83 2022/07/23 16:16:25 florian Exp $ */ +/* $OpenBSD: engine.c,v 1.84 2022/08/26 00:02:08 kn Exp $ */ /* * Copyright (c) 2017 Florian Obser @@ -309,6 +309,7 @@ int64_t proposal_id; #define CASE(x) case x : return #x +#ifndef SMALL static const char* if_state_name(enum if_state ifs) { @@ -332,6 +333,7 @@ proposal_state_name(enum proposal_state ps) CASE(PROPOSAL_STALE); } } +#endif void engine_sig_handler(int sig, short event, void *arg) -- 2.20.1