charlesbaynham / OSFS

Overly Simplified File System for Arduino EEPROM
GNU General Public License v3.0
33 stars 9 forks source link

Compiler warnings (default level at Arduino IDE) #1

Closed NickNifontov closed 5 years ago

NickNifontov commented 6 years ago

`

sketch\LeOS_EEPROM.cpp: In function 'void OSFS::readNBytes(uint16_t, unsigned int, void*)':

sketch\LeOS_EEPROM.cpp:45:11: warning: ISO C++ forbids incrementing a pointer of type 'void*' [-Wpointer-arith]

 output++;

       ^

sketch\LeOS_EEPROM.cpp: In function 'void OSFS::writeNBytes(uint16_t, unsigned int, const void*)':

sketch\LeOS_EEPROM.cpp:53:10: warning: ISO C++ forbids incrementing a pointer of type 'const void*' [-Wpointer-arith]

 input++;

      ^

In file included from sketch\LeOS_EEPROM.cpp:5:0:

sketch\OSFS.h: In instantiation of 'OSFS::result OSFS::getFile(const char*, T&) [with T = int]':

sketch\LeOS_EEPROM.cpp:274:34: required from here

sketch\OSFS.h:121:23: warning: 'readNBytesChk' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]

return readNBytesChk(add, size, &buf);

                   ^

sketch\OSFS.h:230:9: note: 'OSFS::result OSFS::readNBytesChk(uint16_t, unsigned int, void*)' declared here, later in the translation unit

result readNBytesChk(uint16_t address, unsigned int num, void* input);

     ^

sketch\OSFS.h: In instantiation of 'OSFS::result OSFS::getFile(const char*, T&) [with T = long int]':

sketch\LeOS_EEPROM.cpp:275:44: required from here

sketch\OSFS.h:121:23: warning: 'readNBytesChk' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]

return readNBytesChk(add, size, &buf);

                   ^

sketch\OSFS.h:230:9: note: 'OSFS::result OSFS::readNBytesChk(uint16_t, unsigned int, void*)' declared here, later in the translation unit

result readNBytesChk(uint16_t address, unsigned int num, void* input);

     ^

sketch\OSFS.h: In instantiation of 'OSFS::result OSFS::getFile(const char*, T&) [with T = long unsigned int]':

sketch\LeOS_EEPROM.cpp:304:53: required from here

sketch\OSFS.h:121:23: warning: 'readNBytesChk' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]

return readNBytesChk(add, size, &buf);

                   ^

sketch\OSFS.h:230:9: note: 'OSFS::result OSFS::readNBytesChk(uint16_t, unsigned int, void*)' declared here, later in the translation unit

result readNBytesChk(uint16_t address, unsigned int num, void* input);

     ^

sketch\OSFS.h: In instantiation of 'OSFS::result OSFS::getFile(const char*, T&) [with T = _LeOS_DATA_EEPROM]':

sketch\LeOS_EEPROM.cpp:357:38: required from here

sketch\OSFS.h:121:23: warning: 'readNBytesChk' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]

return readNBytesChk(add, size, &buf);

                   ^

sketch\OSFS.h:230:9: note: 'OSFS::result OSFS::readNBytesChk(uint16_t, unsigned int, void*)' declared here, later in the translation unit

result readNBytesChk(uint16_t address, unsigned int num, void* input);

     ^

sketch\OSFS.h: In instantiation of 'OSFS::result OSFS::getFile(const char*, T&) [with T = _LeOS_STAT_EEPROM]':

sketch\LeOS_EEPROM.cpp:367:39: required from here

sketch\OSFS.h:121:23: warning: 'readNBytesChk' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]

return readNBytesChk(add, size, &buf);

                   ^

sketch\OSFS.h:230:9: note: 'OSFS::result OSFS::readNBytesChk(uint16_t, unsigned int, void*)' declared here, later in the translation unit

result readNBytesChk(uint16_t address, unsigned int num, void* input);

     ^`
asjdf commented 5 years ago

same problem .........

charlesbaynham commented 5 years ago

Hi both, sorry I missed this thread when it was opened. I'll take a look

asjdf commented 5 years ago

My chip is esp8266. This problem was solved after I updated my development board library.

charlesbaynham commented 5 years ago

Great. Do you know what version you were using when you were seeing this error? Also, @NickNifontov , what chip are you building for?

NickNifontov commented 5 years ago

Arduino Pro Mini Arduino 1.8.6 Arduino beta 1.9.x

charlesbaynham commented 5 years ago

I think this should be sorted now with 90ace2c704e015abaa0ea54fbf59611488af4ce4. Could you try compiling and running the updated examples?