KravitzLabDevices / FED3_library

GNU General Public License v3.0
6 stars 17 forks source link

Fix warning during code upload #54

Closed KravitzLab closed 2 years ago

KravitzLab commented 2 years ago

C:\Users_\Documents\Arduino\libraries\FED3\src\FED3.cpp: In member function 'void FED3::CreateFile()': C:\Users_\Documents\Arduino\libraries\FED3\src\FED3.cpp:877:9: warning: 'char strcpy(char, const char*)' writing 21 bytes into a region of size 15 overflows the destination [-Wstringop-overflow=] 877 | strcpy(filename, "FED_____.CSV"); // placeholder filename | ~~^~~~~~~~~~

KravitzLab commented 2 years ago

Solution is to allocate more space for the char filename on line 88 of FED3.h char filename[21]; // Array for file name data logged to named in setup

KravitzLab commented 2 years ago

done