ta: crypto_perf: fix build error on type mismatch
Fix build error in crypto_perf TA as shown in below build trace messages when built for a 64bit target: ta_crypto_perf.c: In function 'cmd_asym_process_rsa_ecc': ta_crypto_perf.c:772:33: warning: assignment to 'TEE_Result (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, uint32_t, const void *, uint32_t, void *, uint32_t *)' {aka 'unsigned int (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, unsigned int, const void *, unsigned int, void *, unsigned int *)'} from incompatible pointer type 'TEE_Result (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, uint32_t, const void *, size_t, void *, size_t *)' {aka 'unsigned int (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, unsigned int, const void *, long unsigned int, void *, long unsigned int *)'} [-Wincompatible-pointer-types] 772 | do_asym = TEE_AsymmetricEncrypt; | ^ ta_crypto_perf.c:774:33: warning: assignment to 'TEE_Result (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, uint32_t, const void *, uint32_t, void *, uint32_t *)' {aka 'unsigned int (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, unsigned int, const void *, unsigned int, void *, unsigned int *)'} from incompatible pointer type 'TEE_Result (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, uint32_t, const void *, size_t, void *, size_t *)' {aka 'unsigned int (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, unsigned int, const void *, long unsigned int, void *, long unsigned int *)'} [-Wincompatible-pointer-types] 774 | do_asym = TEE_AsymmetricDecrypt; | ^ ta_crypto_perf.c:776:33: warning: assignment to 'TEE_Result (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, uint32_t, const void *, uint32_t, void *, uint32_t *)' {aka 'unsigned int (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, unsigned int, const void *, unsigned int, void *, unsigned int *)'} from incompatible pointer type 'TEE_Result (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, uint32_t, const void *, size_t, void *, size_t *)' {aka 'unsigned int (*)(struct __TEE_OperationHandle *, const TEE_Attribute *, unsigned int, const void *, long unsigned int, void *, long unsigned int *)'} [-Wincompatible-pointer-types] 776 | do_asym = TEE_AsymmetricSignDigest; | ^ ta_crypto_perf.c:784:64: warning: passing argument 7 of 'do_asym' from incompatible pointer type [-Wincompatible-pointer-types] 784 | params[2].memref.buffer, &dummy_size); | ^~~~~~~~~~~ | | | size_t * {aka long unsigned int *} ta_crypto_perf.c:784:64: note: expected 'uint32_t *' {aka 'unsigned int *'} but argument is of type 'size_t *' {aka 'long unsigned int *'} ta_crypto_perf.c: At top level: Fixes: 14a2b2ac ("ta: crypto_perf: add asymmetric crypto perf tests") Acked-by:Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by:
Etienne Carriere <etienne.carriere@foss.st.com>
Loading
Please register or sign in to comment