From 9c5ee66c8cf401f9f6c04a468c6a3738ee0c19ad Mon Sep 17 00:00:00 2001 From: toddouska Date: Sun, 2 Mar 2014 10:59:03 -0800 Subject: [PATCH] fix -Wunused-macros --- src/ssl.c | 9 ++++----- tests/suites.c | 4 +++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/ssl.c b/src/ssl.c index 3bbeeff37..c34878541 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -1615,13 +1615,8 @@ int AddCA(CYASSL_CERT_MANAGER* cm, buffer der, int type, int verify) static ClientRow ClientCache[SESSION_ROWS]; /* Client Cache */ /* uses session mutex */ - #endif /* NO_CLIENT_CACHE */ - /* for persistance, if changes to layout need to increment and modify - save_session_cache() and restore_session_cache and memory versions too */ - #define CYASSL_CACHE_VERSION 2 - #endif /* NO_SESSION_CACHE */ @@ -3455,6 +3450,10 @@ int CyaSSL_SetServerID(CYASSL* ssl, const byte* id, int len, int newSession) #if defined(PERSIST_SESSION_CACHE) +/* for persistance, if changes to layout need to increment and modify + save_session_cache() and restore_session_cache and memory versions too */ +#define CYASSL_CACHE_VERSION 2 + /* Session Cache Header information */ typedef struct { int version; /* cache layout version id */ diff --git a/tests/suites.c b/tests/suites.c index 4df5a469b..f3cd7ff05 100644 --- a/tests/suites.c +++ b/tests/suites.c @@ -36,7 +36,9 @@ #define MAX_COMMAND_SZ 240 #define MAX_SUITE_SZ 80 #define NOT_BUILT_IN -123 -#define VERSION_TOO_OLD -124 +#ifdef NO_OLD_TLS + #define VERSION_TOO_OLD -124 +#endif #include "examples/client/client.h" #include "examples/server/server.h"