From d755911bba761cb016fc25c7bf02955e9e1f5d21 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. --- 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 b98f9f67d..88636a87b 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;