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>
1 file changed
tree: a1979d75de7854af25520d0d3b4c02ee13463fc4
  1. .github/
  2. core/
  3. keys/
  4. ldelf/
  5. lib/
  6. mk/
  7. scripts/
  8. ta/
  9. .checkpatch.conf
  10. .gitattributes
  11. .gitignore
  12. CHANGELOG.md
  13. LICENSE
  14. MAINTAINERS
  15. Makefile
  16. README.md
  17. typedefs.checkpatch
README.md

OP-TEE Trusted OS

This git contains source code for the secure side implementation of OP-TEE project.

All official OP-TEE documentation has moved to http://optee.readthedocs.io.

// OP-TEE core maintainers