Suppress new gcc-15 -Wunterminated-string-initialization

GCC 15 now warns when character arrays are being initialized by strings
and terminating NUL character doesn't fit. GCC 15.1 also allows marking
such arrays with nonstring attribute to suppress the warning. W/o such
attribute, the warning becomes error due to the global -Werror. Add the
attribute accordingly.

Fixes these errors:

| ./regression_4000_data.h:7919:9: error: initializer-string for array of 'unsigned char' truncates NUL terminator but destination lacks 'nonstring' attribute (20 chars into 19 available) [-Werror=unterminated-string-initialization]
|  7919 |         "encryption standard";
|       |         ^~~~~~~~~~~~~~~~~~~~~
| ./regression_4000_data.h:8387:9: error: initializer-string for array of 'unsigned char' truncates NUL terminator but destination lacks 'nonstring' attribute (113 chars into 112 available) [-Werror=unterminated-string-initialization]
|  8387 |         "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomn"
|       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| ./regression_4000.c:1295:47: error: initializer-string for array of 'unsigned char' truncates NUL terminator but destination lacks 'nonstring' attribute (4 chars into 3 available) [-Werror=unterminated-string-initialization]
|  1295 | static const uint8_t hash_data_sm3_a1_in[3] = "abc";
|       |                                               ^~~~~

Signed-off-by: Denys Dmytriyenko <denys@konsulko.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
Acked-by: Etienne Carriere <etienne.carriere@foss.st.com>
2 files changed
tree: b287534a92857a7ac1864fcf20d627a5697af0a5
  1. .github/
  2. cert/
  3. host/
  4. scripts/
  5. ta/
  6. .gitignore
  7. Android.mk
  8. CMakeLists.txt
  9. CMakeToolchain.txt
  10. LICENSE-BSD
  11. LICENSE-GPL
  12. LICENSE.md
  13. Makefile
  14. README.md
  15. typedefs.checkpatch
README.md

OP-TEE sanity testsuite

This git contains source code for the test suite (xtest) used to test the OP-TEE project.

All official OP-TEE documentation has moved to http://optee.readthedocs.io. The information that used to be here in this git can be found under optee_test.

// OP-TEE core maintainers