mbedtls warning "implicit declaration of function 'time'"
I’m having some weirdness with building the mbedtls module giving me a compiler warning related to “time”:
/home/dleach/work/zephyrproject/modules/crypto/mbedtls/include/mbedtls/platform_time.h:74:24: warning: implicit declaration of function 'time'; did you mean 'gmtime'? [-Wimplicit-function-declaration] #define mbedtls_time time ^~~~ /home/dleach/work/zephyrproject/modules/crypto/mbedtls/library/ssl_cli.c:697:9: note: in expansion of macro 'mbedtls_time' t = mbedtls_time( NULL ); ^~~~~~~~~~~~
The warning is coming from my PR #17736 for /tests/lib/fdtable/. What is confusing me is that using similar configurations for /tests/crypto/rand32, which builds the same file, doesn’t get the warnings. Generally speaking the mbedtls stuff is an optional configuration between mbedtls and tinycrypt but for the KW41Z I have it generically turned mbedtls on.
I can also get the warning to go away for the fdtable test if I enable “CONFIG_NEW_LIBC”.
David Leach
NXP Semiconductors phone: +1.210.241.6761 Email: david.leach@...
** PROPRIETARY & COMPANY-CONFIDENTIAL **
|
|
Figured out the problem. This is a multi-layered issue that starts with an invalid Kconfig setting I did. I had, by default, turned on MBEDTLS in the SOC Kconfig. This had a ripple affect:
David
From: users@... <users@...>
On Behalf Of David Leach via Lists.Zephyrproject.Org
Sent: Sunday, July 28, 2019 10:08 PM To: users@... Cc: users@... Subject: [Zephyr-users] mbedtls warning "implicit declaration of function 'time'"
I’m having some weirdness with building the mbedtls module giving me a compiler warning related to “time”:
/home/dleach/work/zephyrproject/modules/crypto/mbedtls/include/mbedtls/platform_time.h:74:24: warning: implicit declaration of function 'time'; did you mean 'gmtime'? [-Wimplicit-function-declaration] #define mbedtls_time time ^~~~ /home/dleach/work/zephyrproject/modules/crypto/mbedtls/library/ssl_cli.c:697:9: note: in expansion of macro 'mbedtls_time' t = mbedtls_time( NULL ); ^~~~~~~~~~~~
The warning is coming from my PR #17736 for /tests/lib/fdtable/. What is confusing me is that using similar configurations for /tests/crypto/rand32, which builds the same file, doesn’t get the warnings. Generally speaking the mbedtls stuff is an optional configuration between mbedtls and tinycrypt but for the KW41Z I have it generically turned mbedtls on.
I can also get the warning to go away for the fdtable test if I enable “CONFIG_NEW_LIBC”.
David Leach
NXP Semiconductors phone: +1.210.241.6761 Email: david.leach@...
** PROPRIETARY & COMPANY-CONFIDENTIAL **
|
|