From 6c83a2bfc905f10c2a73e5c88693a28dc94c85e0 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Fri, 14 Aug 2026 15:11:47 -0700 Subject: [PATCH] Mark the forwarding packet builders maybe-unused BuildDirectTcpipExtra() and BuildGlobalRequestFwdPacket() have callers in several conditional blocks, and a build with none of them left the two functions unused, which -Werror turns into a build failure. ReadUint32() next to them already carries the attribute for the same reason. - --disable-server builds regress.c again. --- tests/regress.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/regress.c b/tests/regress.c index e7dff779..333d9c75 100644 --- a/tests/regress.c +++ b/tests/regress.c @@ -291,8 +291,10 @@ static word32 BuildChannelDataPacket(word32 peerChannelId, const char* data, #ifdef WOLFSSH_FWD -static word32 BuildDirectTcpipExtra(const char* host, word32 hostPort, - const char* origin, word32 originPort, byte* out, word32 outSz) +/* Callers sit in separate conditional blocks; some builds have none. */ +static WS_MAYBE_UNUSED word32 BuildDirectTcpipExtra(const char* host, + word32 hostPort, const char* origin, word32 originPort, byte* out, + word32 outSz) { word32 idx = 0; @@ -304,8 +306,8 @@ static word32 BuildDirectTcpipExtra(const char* host, word32 hostPort, return idx; } -static word32 BuildGlobalRequestFwdPacket(const char* bindAddr, word32 bindPort, - int isCancel, byte wantReply, byte* out, word32 outSz) +static WS_MAYBE_UNUSED word32 BuildGlobalRequestFwdPacket(const char* bindAddr, + word32 bindPort, int isCancel, byte wantReply, byte* out, word32 outSz) { byte payload[256]; word32 idx = 0;