| H A D | entry.c | 9894fdb4879ff177daadc33d4a288a27e163e0f5 Fri Feb 24 10:30:48 UTC 2023 Clement Faure <clement.faure@nxp.com> ta: pkcs11: fix trace compilation warning
Fix the following compilation issue: $ make PLATFORM=imx-mx8mmevk CFG_TEE_TA_LOG_LEVEL=4 CFG_PKCS11_TA=y
In file included from out/arm-plat-imx/export-ta_arm64/include/assert.h:9, from ta/pkcs11/src/entry.c:6: ta/pkcs11/src/entry.c: In function ‘TA_InvokeCommandEntryPoint’: ta/pkcs11/src/entry.c:143:14: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=] 143 | DMSG("%s p#0 %"PRIu32"@%p, p#1 %s %"PRIu32"@%p, p#2 %s %"PRIu32"@%p", | ^~~~~~~~~~ 144 | id2str_ta_cmd(cmd), 145 | params[0].memref.size, params[0].memref.buffer, | ~~~~~~~~~~~~~~~~~~~~~ | | | size_t {aka long unsigned int} out/arm-plat-imx/export-ta_arm64/include/trace.h:41:22: note: in definition of macro ‘trace_printf_helper’ 41 | __VA_ARGS__) | ^~~~~~~~~~~ ta/pkcs11/src/entry.c:143:9: note: in expansion of macro ‘DMSG’ 143 | DMSG("%s p#0 %"PRIu32"@%p, p#1 %s %"PRIu32"@%p, p#2 %s %"PRIu32"@%p", | ^~~~ ta/pkcs11/src/entry.c:143:23: note: format string is defined here 143 | DMSG("%s p#0 %"PRIu32"@%p, p#1 %s %"PRIu32"@%p, p#2 %s %"PRIu32"@%p", | ~^ | | | unsigned int | %lu ta/pkcs11/src/entry.c:143:14: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 10 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=] 143 | DMSG("%s p#0 %"PRIu32"@%p, p#1 %s %"PRIu32"@%p, p#2 %s %"PRIu32"@%p", | ^~~~~~~~~~ ...... 148 | param_is_memref(ptypes, 1) ? params[1].memref.size : 0, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | size_t {aka long unsigned int} out/arm-plat-imx/export-ta_arm64/include/trace.h:41:22: note: in definition of macro ‘trace_printf_helper’ 41 | __VA_ARGS__) | ^~~~~~~~~~~ ta/pkcs11/src/entry.c:143:9: note: in expansion of macro ‘DMSG’ 143 | DMSG("%s p#0 %"PRIu32"@%p, p#1 %s %"PRIu32"@%p, p#2 %s %"PRIu32"@%p", | ^~~~ ta/pkcs11/src/entry.c:143:14: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 13 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=] 143 | DMSG("%s p#0 %"PRIu32"@%p, p#1 %s %"PRIu32"@%p, p#2 %s %"PRIu32"@%p", | ^~~~~~~~~~ ...... 152 | param_is_memref(ptypes, 2) ? params[2].memref.size : 0, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | size_t {aka long unsigned int} out/arm-plat-imx/export-ta_arm64/include/trace.h:41:22: note: in definition of macro ‘trace_printf_helper’ 41 | __VA_ARGS__) | ^~~~~~~~~~~ ta/pkcs11/src/entry.c:143:9: note: in expansion of macro ‘DMSG’ 143 | DMSG("%s p#0 %"PRIu32"@%p, p#1 %s %"PRIu32"@%p, p#2 %s %"PRIu32"@%p", | ^~~~
Signed-off-by: Clement Faure <clement.faure@nxp.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
|