From cb49e1821be5ce3d68043afd125920144a33245a Mon Sep 17 00:00:00 2001 From: Luflosi Date: Sun, 6 Oct 2019 22:53:42 +0200 Subject: [PATCH] Use the correct type in a for loop The `sizeof()` operator has the type `size_t`, so the `for` loop iterating over it should use the same type. Closes #1614. (cherry picked from commit 74a46dfa0cca79e871b24dbbb9e595b4fe65e0f6) --- src/cocoa_joystick.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cocoa_joystick.m b/src/cocoa_joystick.m index a8121e85..2c8d82d9 100644 --- a/src/cocoa_joystick.m +++ b/src/cocoa_joystick.m @@ -331,7 +331,7 @@ void _glfwInitJoysticksNS(void) return; } - for (int i = 0; i < sizeof(usages) / sizeof(long); i++) + for (size_t i = 0; i < sizeof(usages) / sizeof(long); i++) { const long page = kHIDPage_GenericDesktop;