mbedtls/tests/include/test
Gilles Peskine c86a16548c Don't use STATIC_ASSERT_EXPR on non-GCC-compatible compilers
ARRAY_LENGTH has a portable but unsafe implementation, and a
non-portable implementation that causes a compile-time error if the
macro is accidentally used on a pointer.

The safety check was only implemented for __GCC__-defining compilers,
but the part that triggered the compile-time error was always used. It
turns out that this part triggers a build warning with MSVC (at least
with some versions: observed with Visual Studio 2013).
```
C:\builds\workspace\mbed-tls-pr-head_PR-4141-head\src\tests\src\psa_crypto_helpers.c(52): error C2220: warning treated as error - no 'object' file generated [C:\builds\workspace\mbed-tls-pr-head_PR-4141-head\src\mbedtls_test.vcxproj]
C:\builds\workspace\mbed-tls-pr-head_PR-4141-head\src\tests\src\psa_crypto_helpers.c(52): warning C4116: unnamed type definition in parentheses [C:\builds\workspace\mbed-tls-pr-head_PR-4141-head\src\mbedtls_test.vcxproj]
```

Since a compile-time error is never triggered when the compile-time
check for the argument type is not implemented, just use the unsafe
macro directly when there's no safety check.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-02-23 20:36:07 +01:00
..
drivers tests: psa: Change key management test driver default forced return value 2021-02-02 11:29:08 +01:00
asn1_helpers.h Move asn1_skip_integer to the asn1_helpers module 2021-02-23 20:29:38 +01:00
constant_flow.h Merge pull request #736 from mpg/cf-varpos-copy-dev-restricted 2020-08-25 14:35:55 +01:00
fake_external_rng_for_test.h Move the fake PSA external RNG to its own header and source files 2021-01-20 20:02:01 +01:00
helpers.h Detect and report mutex usage errors 2021-02-22 19:08:14 +01:00
macros.h Don't use STATIC_ASSERT_EXPR on non-GCC-compatible compilers 2021-02-23 20:36:07 +01:00
psa_crypto_helpers.h Destroy recorded persistent keys in PSA_DONE() 2021-02-23 20:36:07 +01:00
psa_exercise_key.h Use const pointers on parsing functions 2021-02-23 20:29:38 +01:00
psa_helpers.h Update copyright notices to use Linux Foundation guidance 2020-08-19 10:35:41 +02:00
random.h Update copyright notices to use Linux Foundation guidance 2020-08-19 10:35:41 +02:00