xtest: remove __unused and do not include <compiler.h>

xtest (the 'host' part, not the TAs) uses __unused from OP-TEE's
<compiler.h>. This does not comply with the following statement from
the C specification:

 In addition to the names documented in this manual, reserved names
 include all external identifiers (global functions and variables)
 that begin with an underscore (‘_’) and all identifiers regardless of
 use that begin with either two underscores or an underscore followed
 by a capital letter are reserved names. This is so that the library
 and header files can define functions, variables, and macros for
 internal purposes without risk of conflict with names in user
 programs.

This is not a hypothetical problem, __unused is used by musl and as
such optee-test can't be built with musl.

<compiler.h> and __unused should only be used in TAs (in which case we
know the C library is OP-TEE's libutils). Remove them from xtest and add
-Wno-unused-param to the C flags instead.

Reported-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Jerome Forissier <jerome@forissier.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
11 files changed
tree: 24fea5ccec121bf56a4267f2dd060238648f3987
  1. .github/
  2. cert/
  3. host/
  4. scripts/
  5. ta/
  6. .gitignore
  7. Android.mk
  8. CMakeLists.txt
  9. CMakeToolchain.txt
  10. LICENSE.md
  11. Makefile
  12. README.md
  13. 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