Skip to content

Commit cedffb8

Browse files
ejohnstownphilljj
authored andcommitted
ssh: gate the accept/connect log strings on WLOG
The four format strings are used only through WLOG(), so they now sit under the same DEBUG_WOLFSSH/WOLFSSH_SSHD condition that compiles it in. A namespace-scope const is internal in C++, and clang++ rejected the unused arrays with -Wunused-const-variable under -Werror.
1 parent 894aed5 commit cedffb8

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎src/ssh.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,8 +634,10 @@ static int DoReceiveHandshake(WOLFSSH* ssh)
634634

635635
#ifndef NO_WOLFSSH_SERVER
636636

637+
#if defined(DEBUG_WOLFSSH) || defined(WOLFSSH_SSHD)
637638
const char acceptError[] = "accept error: %s, %d";
638639
const char acceptState[] = "accept state: %s";
640+
#endif
639641

640642

641643
int wolfSSH_accept(WOLFSSH* ssh)
@@ -899,8 +901,10 @@ int wolfSSH_accept(WOLFSSH* ssh)
899901

900902
#ifndef NO_WOLFSSH_CLIENT
901903

904+
#if defined(DEBUG_WOLFSSH) || defined(WOLFSSH_SSHD)
902905
const char connectError[] = "connect error: %s, %d";
903906
const char connectState[] = "connect state: %s";
907+
#endif
904908

905909

906910
int wolfSSH_connect(WOLFSSH* ssh)

0 commit comments

Comments
 (0)