From 74a46dfa0cca79e871b24dbbb9e595b4fe65e0f6 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 b98f9f67..88636a87 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;