tests: mbedtls: Fix GCC warning about test_snprintf
Fix errors like: inlined from ‘test_mbedtls’ at zephyrproject/zephyr/tests/crypto/mbedtls/src/mbedtls.c:172:6: zephyrproject/zephyr/tests/crypto/mbedtls/src/mbedtls.c:96:17: error: ‘test_snprintf’ reading 10 bytes from a region of size 1 [-Werror=stringop-overread] 96 | test_snprintf(1, "", -1) != 0 || | ^~~~~~~~~~~~~~~~~~~~~~~~ In GCC >= 11 because `ret_buf` in some calls are shorter literals Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
5e8b7b5b37
commit
890f619936
1 changed files with 1 additions and 1 deletions
|
@ -71,7 +71,7 @@
|
|||
#include "mbedtls/memory_buffer_alloc.h"
|
||||
#endif
|
||||
|
||||
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…
Add table
Add a link
Reference in a new issue