Mesa (master): anv: Fix wrong printf formatter

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 19 16:59:44 UTC 2019


Module: Mesa
Branch: master
Commit: 9c19d07b1cdcd22ced0f4e1c147e496b6ff5cf23
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9c19d07b1cdcd22ced0f4e1c147e496b6ff5cf23

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Wed Jun 19 11:57:01 2019 -0500

anv: Fix wrong printf formatter

%lu is for unsigned long, %zu is for size_t.  Just cast the data.

---

 src/intel/vulkan/anv_pipeline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index a254f0a2c3c..ea01b2f04f9 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -113,7 +113,7 @@ static void anv_spirv_nir_debug(void *private_data,
    };
    char buffer[256];
 
-   snprintf(buffer, sizeof(buffer), "SPIR-V offset %lu: %s", spirv_offset, message);
+   snprintf(buffer, sizeof(buffer), "SPIR-V offset %lu: %s", (unsigned long) spirv_offset, message);
 
    vk_debug_report(&debug_data->device->instance->debug_report_callbacks,
                    vk_flags[level],




More information about the mesa-commit mailing list