Move (unused) functions under !SMALL
authorkn <kn@openbsd.org>
Fri, 26 Aug 2022 00:02:08 +0000 (00:02 +0000)
committerkn <kn@openbsd.org>
Fri, 26 Aug 2022 00:02:08 +0000 (00:02 +0000)
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

index 6d0eed7..7ca0065 100644 (file)
@@ -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 <florian@openbsd.org>
@@ -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)