Fix printf format string warnings
This fixes warnings that arise when adding __attribute__((format ...))
to some of the Magma logging functions.
Change-Id: Ie4c9dfb9c3fb77a4f611bf58d80db6c52d055be1
diff --git a/src/intel/vulkan/anv_magma.cc b/src/intel/vulkan/anv_magma.cc
index d6b8ab4..d3819cb 100644
--- a/src/intel/vulkan/anv_magma.cc
+++ b/src/intel/vulkan/anv_magma.cc
@@ -124,7 +124,7 @@
error = magma_system_alloc(magma_connection(device), required_size, &allocated_size, &cmd_buf_id);
if (error)
- return DRET_MSG(error, "magma_system_alloc failed size 0x%llx", required_size);
+ return DRET_MSG(error, "magma_system_alloc failed size 0x%" PRIx64, required_size);
DASSERT(allocated_size >= required_size);
diff --git a/src/intel/vulkan/tests/test_wsi_magma.cc b/src/intel/vulkan/tests/test_wsi_magma.cc
index bbf34bc..6248027 100644
--- a/src/intel/vulkan/tests/test_wsi_magma.cc
+++ b/src/intel/vulkan/tests/test_wsi_magma.cc
@@ -146,7 +146,7 @@
return DRETF(false, "fpGetPhysicalDeviceSurfaceFormatsKHR failed %d", result);
if (surfFormats.size() != 1)
- return DRETF(false, "unexpected number of surface formats %d", surfFormats.size());
+ return DRETF(false, "unexpected number of surface formats %zd", surfFormats.size());
if (surfFormats[0].format != VK_FORMAT_B8G8R8A8_UNORM)
return DRETF(false, "unexpected surface format 0x%x", surfFormats[0].format);
@@ -164,7 +164,7 @@
return DRETF(false, "fpGetPhysicalDeviceSurfacePresentModesKHR failed %d", result);
if (presentModes.size() != 1)
- return DRETF(false, "unexpected number of present modes %d", presentModes.size());
+ return DRETF(false, "unexpected number of present modes %zd", presentModes.size());
if (presentModes[0] != VK_PRESENT_MODE_FIFO_KHR)
return DRETF(false, "unexpected present mode 0x%x", presentModes[0]);