From ba1ad4016834c5019e3b64ddc3d441ca7c12257f Mon Sep 17 00:00:00 2001 From: Sandeep Mistry <s.mistry@arduino.cc> Date: Tue, 26 Jan 2016 16:38:23 -0500 Subject: [PATCH] Add cast for string passed into strlen --- cores/arduino/USB/USBCore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cores/arduino/USB/USBCore.cpp b/cores/arduino/USB/USBCore.cpp index 4277bc4e..c9bd2ecc 100644 --- a/cores/arduino/USB/USBCore.cpp +++ b/cores/arduino/USB/USBCore.cpp @@ -92,7 +92,7 @@ bool USBDeviceClass::sendStringDescriptor(const uint8_t *string, uint8_t maxlen) uint8_t buffer[maxlen]; buffer[0] = 0x03; - buffer[1] = strlen(string) * 2 + 2; + buffer[1] = strlen((const char*)string) * 2 + 2; uint8_t i; for (i = 2; i < maxlen && *string; i++) { -- GitLab