From 3b6450f188050a03e6d21624b82b5745dea3d028 Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Fri, 3 Jul 2026 17:12:25 -0500 Subject: [PATCH] Fix warnings in MSILaptopController.cpp --- Controllers/MSILaptopController/MSILaptopController.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Controllers/MSILaptopController/MSILaptopController.cpp b/Controllers/MSILaptopController/MSILaptopController.cpp index dcba4c344..a4621c7b9 100644 --- a/Controllers/MSILaptopController/MSILaptopController.cpp +++ b/Controllers/MSILaptopController/MSILaptopController.cpp @@ -61,8 +61,8 @@ msi_laptop_device MSILaptopController::GetDeviceType() void MSILaptopController::SetLEDs(std::vector leds, std::vector colors) { - unsigned char buf[MSI_LAPTOP_PACKET_SIZE]; - unsigned int led_count = (leds.size() < colors.size()) ? leds.size() : colors.size(); + unsigned char buf[MSI_LAPTOP_PACKET_SIZE]; + std::size_t led_count = (leds.size() < colors.size()) ? leds.size() : colors.size(); memset(buf, 0x00, sizeof(buf)); @@ -76,9 +76,9 @@ void MSILaptopController::SetLEDs(std::vector leds, std::vector c buf[MSI_LAPTOP_PAYLOAD_OFFSET + (i * 4)] = 0xFF; } - for(unsigned int led_idx = 0; led_idx < led_count; led_idx++) + for(std::size_t led_idx = 0; led_idx < led_count; led_idx++) { - unsigned int offset = MSI_LAPTOP_PAYLOAD_OFFSET + (led_idx * 4); + std::size_t offset = MSI_LAPTOP_PAYLOAD_OFFSET + (led_idx * 4); if((offset + 3) >= sizeof(buf)) {