From 6088a7bd7904917d4b589f51a2f3c4da2fa72aa5 Mon Sep 17 00:00:00 2001 From: Ethan Looney Date: Fri, 24 Jul 2020 10:03:49 -0700 Subject: [PATCH] Added if defined debug check to only print to file if debug is enabled --- tests/api.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/api.c b/tests/api.c index 77e405484..842ae075a 100644 --- a/tests/api.c +++ b/tests/api.c @@ -27194,15 +27194,16 @@ static int test_wc_ERR_print_errors_fp (void) WOLFSSL_ERROR(BAD_FUNC_ARG); XFILE fp = XFOPEN("./tests/test-log-dump-to-file.txt", "ar"); wc_ERR_print_errors_fp(fp); - +#if defined(DEBUG_WOLFSSL) AssertTrue(XFSEEK(fp, 0, XSEEK_END) == 0); sz = XFTELL(fp); if (sz == 0) { ret = BAD_FUNC_ARG; } - +#endif printf(resultFmt, ret == 0 ? passed : failed); XFCLOSE(fp); + (void)sz; #endif return ret; }/*End test_wc_ERR_print_errors_fp*/