From dab4a95dc50591125cf7a9e3adce2144fe2aa4ba Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Thu, 1 Aug 2024 00:21:55 -0500 Subject: [PATCH] Fix possible loss of data warning in PhilipsWizController.cpp --- Controllers/PhilipsWizController/PhilipsWizController.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Controllers/PhilipsWizController/PhilipsWizController.cpp b/Controllers/PhilipsWizController/PhilipsWizController.cpp index bef88824..6c6a55a7 100644 --- a/Controllers/PhilipsWizController/PhilipsWizController.cpp +++ b/Controllers/PhilipsWizController/PhilipsWizController.cpp @@ -128,7 +128,7 @@ void PhilipsWizController::SetColor(unsigned char red, unsigned char green, unsi \*-----------------------------------------------------------------*/ std::string command_str = command.dump(); - port.udp_write((char *)command_str.c_str(), command_str.length() + 1); + port.udp_write((char *)command_str.c_str(), (int)command_str.length() + 1); } void PhilipsWizController::SetScene(int scene, unsigned char brightness) @@ -147,7 +147,7 @@ void PhilipsWizController::SetScene(int scene, unsigned char brightness) \*------------------------------------------------------------*/ std::string command_str = command.dump(); - port.udp_write((char*)command_str.c_str(), command_str.length() + 1); + port.udp_write((char*)command_str.c_str(), (int)command_str.length() + 1); } void PhilipsWizController::ReceiveThreadFunction() @@ -224,7 +224,7 @@ void PhilipsWizController::RequestSystemConfig() \*-----------------------------------------------------------------*/ std::string command_str = command.dump(); - port.udp_write((char *)command_str.c_str(), command_str.length() + 1); + port.udp_write((char *)command_str.c_str(), (int)command_str.length() + 1); /*-----------------------------------------------------------------*\ | Wait up to 1s to give it time to receive and process response |