mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
Added if defined debug check to only print to file if debug is enabled
This commit is contained in:
@ -27194,15 +27194,16 @@ static int test_wc_ERR_print_errors_fp (void)
|
|||||||
WOLFSSL_ERROR(BAD_FUNC_ARG);
|
WOLFSSL_ERROR(BAD_FUNC_ARG);
|
||||||
XFILE fp = XFOPEN("./tests/test-log-dump-to-file.txt", "ar");
|
XFILE fp = XFOPEN("./tests/test-log-dump-to-file.txt", "ar");
|
||||||
wc_ERR_print_errors_fp(fp);
|
wc_ERR_print_errors_fp(fp);
|
||||||
|
#if defined(DEBUG_WOLFSSL)
|
||||||
AssertTrue(XFSEEK(fp, 0, XSEEK_END) == 0);
|
AssertTrue(XFSEEK(fp, 0, XSEEK_END) == 0);
|
||||||
sz = XFTELL(fp);
|
sz = XFTELL(fp);
|
||||||
if (sz == 0) {
|
if (sz == 0) {
|
||||||
ret = BAD_FUNC_ARG;
|
ret = BAD_FUNC_ARG;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
printf(resultFmt, ret == 0 ? passed : failed);
|
printf(resultFmt, ret == 0 ? passed : failed);
|
||||||
XFCLOSE(fp);
|
XFCLOSE(fp);
|
||||||
|
(void)sz;
|
||||||
#endif
|
#endif
|
||||||
return ret;
|
return ret;
|
||||||
}/*End test_wc_ERR_print_errors_fp*/
|
}/*End test_wc_ERR_print_errors_fp*/
|
||||||
|
Reference in New Issue
Block a user