mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-10 06:44:28 +00:00
Function test_snprintf() is called by run_test_snprintf() with constant test data. It gets inlined and is subjected to snprintf format truncation checks introduced by -Wformat-truncation in gcc-7. -Wformat-truncation is turned On by -Wall and other similar options. It results in error with -Werror. -Wformat-truncation makes tests performed by run_test_snprintf() redundant on gcc. But they are still relevant for other compilers. This commit prevents inlining of test_snprintf() to avoid gcc compile time checks.