mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-22 19:15:36 +00:00
Fix GCC warning about test_snprintf
GCC 11 generated the warnings because the parameter `ret_buf` was declared as `const char[10]`, but some of the arguments provided in `run_test_snprintf` are shorter literals, like "". Now the type of `ret_buf` is `const char *`. Both implementations of `test_snprintf` were fixed. Signed-off-by: Rodrigo Dias Correa <rodrigo@correas.us>
This commit is contained in:
parent
375366a197
commit
5fb1bd487d
|
@ -180,7 +180,7 @@ static int calloc_self_test( int verbose )
|
|||
}
|
||||
#endif /* MBEDTLS_SELF_TEST */
|
||||
|
||||
static int test_snprintf( size_t n, const char ref_buf[10], int ref_ret )
|
||||
static int test_snprintf( size_t n, const char *ref_buf, int ref_ret )
|
||||
{
|
||||
int ret;
|
||||
char buf[10] = "xxxxxxxxx";
|
||||
|
|
|
@ -226,7 +226,7 @@ int parse_arguments( char *buf, size_t len, char *params[50] )
|
|||
return( cnt );
|
||||
}
|
||||
|
||||
static int test_snprintf( size_t n, const char ref_buf[10], int ref_ret )
|
||||
static int test_snprintf( size_t n, const char *ref_buf, int ref_ret )
|
||||
{
|
||||
int ret;
|
||||
char buf[10] = "xxxxxxxxx";
|
||||
|
|
Loading…
Reference in a new issue