From f8bce0b2134a63c731805898824a539237afe2d4 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Sun, 1 May 2022 13:55:24 +0100 Subject: [PATCH] st/oxr: Fix conversion warnings --- src/xrt/state_trackers/oxr/oxr_binding.c | 3 ++- src/xrt/state_trackers/oxr/oxr_input_transform.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/xrt/state_trackers/oxr/oxr_binding.c b/src/xrt/state_trackers/oxr/oxr_binding.c index 8ac9c69a0..6a5f62659 100644 --- a/src/xrt/state_trackers/oxr/oxr_binding.c +++ b/src/xrt/state_trackers/oxr/oxr_binding.c @@ -26,8 +26,9 @@ setup_paths(struct oxr_logger *log, struct binding_template *templ, struct oxr_binding *binding) { - size_t count = 0; + uint32_t count = 0; while (templ->paths[count] != NULL) { + assert(count != UINT32_MAX); count++; } diff --git a/src/xrt/state_trackers/oxr/oxr_input_transform.c b/src/xrt/state_trackers/oxr/oxr_input_transform.c index c03c0ea31..f38d478bf 100644 --- a/src/xrt/state_trackers/oxr/oxr_input_transform.c +++ b/src/xrt/state_trackers/oxr/oxr_input_transform.c @@ -191,8 +191,8 @@ oxr_input_transform_process(const struct oxr_input_transform *transform, static bool ends_with(const char *str, const char *suffix) { - int len = strlen(str); - int suffix_len = strlen(suffix); + size_t len = strlen(str); + size_t suffix_len = strlen(suffix); return (len >= suffix_len) && (0 == strcmp(str + (len - suffix_len), suffix)); }