Arduino IDE 2.0.2 warning
crasheg opened this issue · 0 comments
crasheg commented
While compiling USB_CDC project for ESP32S2 i have warning
In file included from \libraries\EspTinyUSB-2.0.2\src\device\msc\flashdisk.cpp:1:
\libraries\EspTinyUSB-2.0.2\src/flashdisk.h:15:28: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
bool init(char* path = "/fatfs",char* label = NULL);
change \src\flashdisk.h:15
bool init(char* path = "/fatfs",char* label = NULL);
to
bool init(char* path = (char*)"/fatfs",char* label = NULL);
resolves this problem
great idea to add examples for changing manufacturer, product and e.g. in users projects to compile without warnings.
for my project i used this method:
in global space:
char *manufacturer = (char*)"BELAUTOMATIC GROUP";
in setup function:
USBSerial.manufacturer(manufacturer);
and there is no warnings and Ubuntu got all parameters, but Windows 10 x64 как обычно, сука, ебет мозг(