This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit 6721ae3555042aa15f6cb76b08d18817bdcaaf91 Author: cuiziwei <cuizi...@xiaomi.com> AuthorDate: Thu Oct 19 16:49:29 2023 +0800 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 <cuizi...@xiaomi.com> --- crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c | 1 + 1 file changed, 1 insertion(+) diff --git a/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c b/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c index d1ce54462..0b16617fd 100644 --- a/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c +++ b/crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c @@ -26,6 +26,7 @@ #include <openssl/hmac.h> #include <mbedtls/hmac_drbg.h> #include <mbedtls/md.h> +#include <stdlib.h> /**************************************************************************** * Public Functions