pnor_partition_table: Fix printf() format specifier for size_t

On x86_64 we receive the following warning from GCC:

    In file included from pnor_partition_table.cpp:2:0:
    pnor_partition_table.cpp: In member function ‘const pnor_partition& openpower::virtual_pnor::partition::Table::partition(size_t) const’:
    common.h:37:61: error: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘size_t {aka long unsigned int}’ [-Werror=format=]
     #define MSG_ERR(f_, ...) mbox_log(LOG_ERR, f_, ##__VA_ARGS__)
                                                                 ^
    pnor_partition_table.cpp:218:5: note: in expansion of macro ‘MSG_ERR’
         MSG_ERR("Partition corresponding to offset %x not found", offset);
         ^~~~~~~

The type of %x may not match the size of the type on the host system. Use %zu
to avoid a compiler warning.

Change-Id: I79b0a33af6fc4e0c06c60457e89d0c4125d1e39d
Tested: Changed the format specifier and recompiled, observed no warnings
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
1 file changed
tree: b690f3da6e5ecf62dcd8a4f7015d55cb0b421824
  1. Documentation/
  2. m4/
  3. test/
  4. xyz/
  5. .gitignore
  6. bootstrap.sh
  7. common.c
  8. common.h
  9. configure.ac
  10. dbus.h
  11. LICENSE
  12. Makefile.am
  13. mbox.h
  14. mboxctl.c
  15. mboxd.c
  16. mboxd_dbus.c
  17. mboxd_dbus.h
  18. mboxd_flash.h
  19. mboxd_flash_physical.c
  20. mboxd_flash_virtual.cpp
  21. mboxd_lpc.c
  22. mboxd_lpc.h
  23. mboxd_lpc_physical.c
  24. mboxd_lpc_virtual.cpp
  25. mboxd_msg.c
  26. mboxd_msg.h
  27. mboxd_pnor_partition_table.cpp
  28. mboxd_pnor_partition_table.h
  29. mboxd_windows.c
  30. mboxd_windows.h
  31. mtd.c
  32. pnor_partition.cpp
  33. pnor_partition.hpp
  34. pnor_partition_defs.h
  35. pnor_partition_table.cpp
  36. pnor_partition_table.hpp
  37. README.md
README.md

Copyright 2017 IBM

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

MBOX

This repo contains the protocol definition for the host to BMC mailbox communication specification which can be found in Documentation/mbox_procotol.md.

There is also a reference implementation of a BMC mailbox daemon, the details of which can be found in Documentation/mboxd.md.

Finally there is also an implementation of a mailbox daemon control program, the details of which can be found in Documentation/mboxctl.md.