Skip to content

Commit 6721ae3

Browse files
cuiziweizwxiaoxiang781216
authored andcommitted
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>
1 parent f7582e3 commit 6721ae3

File tree

1 file changed

+1
-0
lines changed
  • crypto/openssl_mbedtls_wrapper/mbedtls

1 file changed

+1
-0
lines changed

crypto/openssl_mbedtls_wrapper/mbedtls/hmac.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <openssl/hmac.h>
2727
#include <mbedtls/hmac_drbg.h>
2828
#include <mbedtls/md.h>
29+
#include <stdlib.h>
2930

3031
/****************************************************************************
3132
* Public Functions

0 commit comments

Comments
 (0)