Skip to content

Commit 42b7d35

Browse files
MBEDTLS_DEPRECATED_WARNING now always emits a #warning
MBEDTLS_DEPRECATED_WARNING now always emits a #warning since this branch as a whole is deprecated. So disable it from most builds.
1 parent d1428a2 commit 42b7d35

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

scripts/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ def include_in_full(name):
166166
if name in [
167167
'MBEDTLS_CTR_DRBG_USE_128_BIT_KEY',
168168
'MBEDTLS_DEPRECATED_REMOVED',
169+
'MBEDTLS_DEPRECATED_WARNING',
169170
'MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED',
170171
'MBEDTLS_ECP_RESTARTABLE',
171172
'MBEDTLS_ENTROPY_FORCE_SHA256', # Variant toggle, tested separately

tests/scripts/all.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -702,11 +702,12 @@ component_test_full_make_gcc_o0 () {
702702
}
703703

704704
component_build_deprecated () {
705-
msg "build: make, full config + DEPRECATED_WARNING, gcc -O" # ~ 30s
705+
msg "build: make, full config + DEPRECATED_WARNING, gcc -O, expect warnings" # ~ 30s
706706
scripts/config.py full
707707
scripts/config.py set MBEDTLS_DEPRECATED_WARNING
708708
# Build with -O -Wextra to catch a maximum of issues.
709-
make CC=gcc CFLAGS='-O -Werror -Wall -Wextra' lib programs
709+
# Expect #warning stating that Mbed Crypto is no longer updated.
710+
make CC=gcc CFLAGS='-O -Werror -Wall -Wextra -Wno-error=cpp' lib programs
710711
make CC=gcc CFLAGS='-O -Werror -Wall -Wextra -Wno-unused-function' tests
711712

712713
msg "test: make, full config + DEPRECATED_WARNING, expect warnings" # ~ 30s

0 commit comments

Comments
 (0)