ta: os_test: fix build warning in binary property tests

Fix build warning reported with trace below:

os_test.c: In function ‘check_binprop_ones’:
os_test.c:62:14: warning: pointer targets in passing argument 1 of ‘strncmp’ differ in signedness [-Wpointer-sign]
  if (strncmp(bbuf, ones, bblen)) {
              ^~~~
In file included from os_test.c:10:
/local/home/frq93142/Projects/linaro-optee-3.9.0/optee_os/out/arm/export-ta_arm32/include/string.h:23:5: note: expected ‘const char *’ but argument is of type ‘uint8_t *’ {aka ‘unsigned char *’}
 int strncmp(const char *s1, const char *s2, size_t n);
     ^~~~~~~
os_test.c:62:20: warning: pointer targets in passing argument 2 of ‘strncmp’ differ in signedness [-Wpointer-sign]
  if (strncmp(bbuf, ones, bblen)) {
                    ^~~~
In file included from os_test.c:10:
/local/home/frq93142/Projects/linaro-optee-3.9.0/optee_os/out/arm/export-ta_arm32/include/string.h:23:5: note: expected ‘const char *’ but argument is of type ‘uint8_t *’ {aka ‘unsigned char *’}
 int strncmp(const char *s1, const char *s2, size_t n);
     ^~~~~~~

os_test.c: In function ‘get_binblock_property’:
os_test.c:79:53: warning: passing argument 4 of ‘TEE_GetPropertyAsBinaryBlock’ from incompatible pointer type [-Wincompatible-pointer-types]
  res = TEE_GetPropertyAsBinaryBlock(h, NULL, *bbuf, bblen);
                                                     ^~~~~
In file included from ./include/os_test.h:10,
                 from os_test.c:15:
/local/home/frq93142/Projects/linaro-optee-qemu_v8/optee_os/out/arm/export-ta_arm64/include/tee_api.h:30:16: note: expected ‘uint32_t *’ {aka ‘unsigned int *’} but argument is of type ‘size_t *’ {aka ‘long unsigned int *’}
      uint32_t *valueBufferLen);
      ~~~~~~~~~~^~~~~~~~~~~~~~
os_test.c:94:53: warning: passing argument 4 of ‘TEE_GetPropertyAsBinaryBlock’ from incompatible pointer type [-Wincompatible-pointer-types]
  res = TEE_GetPropertyAsBinaryBlock(h, NULL, *bbuf, bblen);
                                                     ^~~~~
In file included from ./include/os_test.h:10,
                 from os_test.c:15:
/local/home/frq93142/Projects/linaro-optee-qemu_v8/optee_os/out/arm/export-ta_arm64/include/tee_api.h:30:16: note: expected ‘uint32_t *’ {aka ‘unsigned int *’} but argument is of type ‘size_t *’ {aka ‘long unsigned int *’}
      uint32_t *valueBufferLen);
      ~~~~~~~~~~^~~~~~~~~~~~~~

Fixes: b34caffbb763 ("xtest: regression 1006: enhance tests on binary block property")
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
1 file changed
tree: e5d3f0e5b095eeb274e47165d293ba25ade2446e
  1. .github/
  2. cert/
  3. host/
  4. package/
  5. scripts/
  6. ta/
  7. .gitignore
  8. Android.mk
  9. CMakeLists.txt
  10. CMakeToolchain.txt
  11. LICENSE.md
  12. Makefile
  13. README.md
  14. 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