Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: b34caff ("xtest: regression 1006: enhance tests on binary block property") Signed-off-by: Etienne Carriere <[email protected]> Acked-by: Jens Wiklander <[email protected]>
- Loading branch information