Skip to content
Commit 58e3a83b authored by Etienne Carriere's avatar Etienne Carriere Committed by Jérôme Forissier
Browse files

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: b34caffb ("xtest: regression 1006: enhance tests on binary block property")
Signed-off-by: default avatarEtienne Carriere <etienne.carriere@linaro.org>
Acked-by: Jens Wiklander's avatarJens Wiklander <jens.wiklander@linaro.org>
parent 1a205ae3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment