Added if defined debug check to only print to file if debug is enabled

This commit is contained in:
Ethan Looney
2020-07-24 10:03:49 -07:00
parent 563806c497
commit 6088a7bd79

View File

@ -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*/