diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2015-10-06 09:57:52 -0600 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2015-10-06 11:52:54 -0600 |
| commit | 9381450261fa1d4f1c3d5bbbaa13dbd0f4b43b9e (patch) | |
| tree | 9d85926a21507f9c0547ee57606e36bbec60bb74 | |
| parent | 00f028e5f58c49fad20fe9dd11ee0f367b0e7de4 (diff) | |
| download | usermoji-9381450261fa1d4f1c3d5bbbaa13dbd0f4b43b9e.tar.xz | |
layers: LunarXchange #145: Fix windows printf format errors
Windows hates %zu. Changed to %lu and cast size_t to unsigned long.
| -rw-r--r-- | layers/vk_layer_logging.h | 4 | ||||
| -rwxr-xr-x | vk-layer-generate.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/layers/vk_layer_logging.h b/layers/vk_layer_logging.h index 065135a6..c7ac17e6 100644 --- a/layers/vk_layer_logging.h +++ b/layers/vk_layer_logging.h @@ -293,8 +293,8 @@ static inline VkBool32 VKAPI log_callback( print_msg_flags(msgFlags, msg_flags); - fprintf((FILE *) pUserData, "%s(%s): object: %#" PRIx64 " type: %d location: %zu msgCode: %d: %s\n", - pLayerPrefix, msg_flags, srcObject, objType, location, msgCode, pMsg); + fprintf((FILE *) pUserData, "%s(%s): object: %#" PRIx64 " type: %d location: %lu msgCode: %d: %s\n", + pLayerPrefix, msg_flags, srcObject, objType, (unsigned long)location, msgCode, pMsg); fflush((FILE *) pUserData); return false; diff --git a/vk-layer-generate.py b/vk-layer-generate.py index 857249f1..f3b72328 100755 --- a/vk-layer-generate.py +++ b/vk-layer-generate.py @@ -131,8 +131,8 @@ class Subcommand(object): return ("%lu", "%s.handle" % name) if "size" in vk_type: if '*' in vk_type: - return ("%zu", "*%s" % name) - return ("%zu", name) + return ("%lu", "(unsigned long)*%s" % name) + return ("%lu", "(unsigned long)%s" % name) if "float" in vk_type: if '[' in vk_type: # handle array, current hard-coded to 4 (TODO: Make this dynamic) if cpp: |
