mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
fix build warning.
CC: vfs/fs_lseek.c /home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c: In function ‘HMAC_CTX_new’:
/home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c:57:31: warning: implicit declaration of function ‘malloc’ [-Wimplicit-function-declaration]
57 | (mbedtls_md_context_t *)malloc(sizeof(mbedtls_md_context_t));
| ^~~~~~
/home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c:28:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
27 | #include <mbedtls/hmac_drbg.h>
+++ |+#include <stdlib.h>
28 | #include <mbedtls/md.h>
/home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c:57:31: warning: incompatible implicit declaration of built-in function ‘malloc’ [-Wbuiltin-declaration-mismatch]
57 | (mbedtls_md_context_t *)malloc(sizeof(mbedtls_md_context_t));
| ^~~~~~
/home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c:57:31: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
/home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c: In function ‘HMAC_CTX_free’:
/home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c:126:3: warning: implicit declaration of function ‘free’ [-Wimplicit-function-declaration]
126 | free(ctx);
| ^~~~
/home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c:126:3: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’
/home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c:126:3: warning: incompatible implicit declaration of built-in function ‘free’ [-Wbuiltin-declaration-mismatch]
/home/cuiziwei/vela/happy/apps/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c:126:3: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
This commit is contained in:
parent
f7582e34e5
commit
6721ae3555
1 changed files with 1 additions and 0 deletions
|
|
@ -26,6 +26,7 @@
|
|||
#include <openssl/hmac.h>
|
||||
#include <mbedtls/hmac_drbg.h>
|
||||
#include <mbedtls/md.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue