From 52a03d2a5e28a379d94d38c629d05b2a3ab0ff19 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Tue, 19 Jul 2016 11:34:21 +0100 Subject: [PATCH] Fix some clang warnings Clang was complaining about some unused functions. Moving the stack declaration to the header seems to sort it. Also the certstatus variable in dtlstest needed to be declared static. Reviewed-by: Richard Levitte --- test/dtlstest.c | 2 +- test/ssltestlib.c | 2 -- test/ssltestlib.h | 4 ++++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/test/dtlstest.c b/test/dtlstest.c index 06db5d28bd..4d497af1af 100644 --- a/test/dtlstest.c +++ b/test/dtlstest.c @@ -23,7 +23,7 @@ static char *privkey = NULL; #define DUMMY_CERT_STATUS_LEN 12 -unsigned char certstatus[] = { +static unsigned char certstatus[] = { SSL3_RT_HANDSHAKE, /* Content type */ 0xfe, 0xfd, /* Record version */ 0, 1, /* Epoch */ diff --git a/test/ssltestlib.c b/test/ssltestlib.c index a6ca5ffa90..ff5cbedd6d 100644 --- a/test/ssltestlib.c +++ b/test/ssltestlib.c @@ -238,8 +238,6 @@ typedef struct mempacket_st { unsigned int type; } MEMPACKET; -DEFINE_STACK_OF(MEMPACKET) - static void mempacket_free(MEMPACKET *pkt) { if (pkt->data != NULL) diff --git a/test/ssltestlib.h b/test/ssltestlib.h index 27f7547751..bd9272f1dc 100644 --- a/test/ssltestlib.h +++ b/test/ssltestlib.h @@ -33,4 +33,8 @@ void bio_s_mempacket_test_free(void); int mempacket_test_inject(BIO *bio, const char *in, int inl, int pktnum, int type); +typedef struct mempacket_st MEMPACKET; + +DEFINE_STACK_OF(MEMPACKET) + #endif /* HEADER_SSLTESTLIB_H */ -- 2.25.1