Avoid unused-variable warnings for str as well

The exact guard is FS_IO && PK_PARSE_C. Just keep it simple.
This commit is contained in:
Gilles Peskine 2018-12-20 12:29:48 +01:00
parent 88ca3a244e
commit 743e3988dc

View File

@ -200,15 +200,14 @@ void invalid_parameters( )
unsigned char *null_buf = NULL; unsigned char *null_buf = NULL;
unsigned char buf[1]; unsigned char buf[1];
unsigned char *p = buf; unsigned char *p = buf;
#if defined(MBEDTLS_FS_IO)
char str[1] = {0}; char str[1] = {0};
#endif
mbedtls_pk_context pk; mbedtls_pk_context pk;
mbedtls_md_type_t valid_md = MBEDTLS_MD_SHA256; mbedtls_md_type_t valid_md = MBEDTLS_MD_SHA256;
void *options = buf; void *options = buf;
(void) null_buf; (void) null_buf;
(void) p; (void) p;
(void) str;
mbedtls_pk_init( &pk ); mbedtls_pk_init( &pk );