ChuckBell / MySQL_Connector_Arduino

Database connector library for using MySQL with your Arduino projects.
332 stars 133 forks source link

compile error in MySQL_Encrypt_Sha1.cpp #208

Closed bendelathouwer closed 1 year ago

bendelathouwer commented 1 year ago

Dear,

When compiling the basic insert code I get the following error MySQL_Encrypt_Sha1.cpp: In member function 'virtual size_t Encrypt_SHA1::write(uint8_t)': \ MySQL_Encrypt_Sha1.cpp:89:1: error: no return statement in function returning non-void [-Werror=return-type] 89 | } | ^ the same also happens on line 9m5 of the same file. What do I need to change to fix this?

Kind regards, Ben

ChuckBell commented 1 year ago

See: https://github.com/ChuckBell/MySQL_Connector_Arduino/pull/177/commits/da48660b9b60cd717e856ed503bcc55ed91d755a

luchengjiang360 commented 1 year ago

在MySQL_Encrypt_Sha1.cpp文件中添加return语句: size_t Encrypt_SHA1::write(uint8_t data) { ++byteCount; addUncounted(data); return byteCount; }

size_t Encrypt_SHA1::write(uint8_t* data, int length) { for (int i=0; i<length; i++) { write(data[i]); } return byteCount; }