Samraksh / eMote

eMote OS -- Multiple Ports (using .NET MF v4.3)
0 stars 0 forks source link

DataStore warnings #327

Open MichaelAtSamraksh opened 9 years ago

MichaelAtSamraksh commented 9 years ago
MicroFrameworkPK_v4_3\DeviceCode\PAL\Samraksh\DataStore\Datastore.cpp: In member function 'int Data_Store::objectCountInBlock(int)':
 MicroFrameworkPK_v4_3\DeviceCode\PAL\Samraksh\DataStore\Datastore.cpp:430:14: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
 MicroFrameworkPK_v4_3\DeviceCode\PAL\Samraksh\DataStore\Datastore.cpp:430:14: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
 MicroFrameworkPK_v4_3\DeviceCode\PAL\Samraksh\DataStore\Datastore.cpp:430:27: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
 MicroFrameworkPK_v4_3\DeviceCode\PAL\Samraksh\DataStore\Datastore.cpp:430:27: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
 MicroFrameworkPK_v4_3\DeviceCode\PAL\Samraksh\DataStore\Datastore.cpp: In member function 'void* Data_Store::getAddress(RECORD_ID)':
 MicroFrameworkPK_v4_3\DeviceCode\PAL\Samraksh\DataStore\Datastore.cpp:564:61: warning: pointer of type 'void *' used in arithmetic [-Wpointer-arith]
 MicroFrameworkPK_v4_3\DeviceCode\PAL\Samraksh\DataStore\Datastore.cpp: In member function 'uint32 Data_Store::readRawData(LPVOID, void*, uint32, uint32)':
 MicroFrameworkPK_v4_3\DeviceCode\PAL\Samraksh\DataStore\Datastore.cpp:1419:52: warning: pointer of type 'void *' used in arithmetic [-Wpointer-arith]
 MicroFrameworkPK_v4_3\DeviceCode\PAL\Samraksh\DataStore\Datastore.cpp: In member function 'uint32 Data_Store::writeRawData(LPVOID, void*, uint32, uint32)':
 MicroFrameworkPK_v4_3\DeviceCode\PAL\Samraksh\DataStore\Datastore.cpp:1494:48: warning: pointer of type 'void *' used in arithmetic [-Wpointer-arith]

This is an embedded target, not a PC with C++11 support.

Nathan-Stohs commented 9 years ago

We should choose a C++ dialect and enforce it. I trivially suggest we go with the default which is gnu++98.

With the compiler change, probably a good moment to do a -Wall and squelch almost all of these and similar.

AnanthAtSamraksh commented 9 years ago

Most of Datastore was written in early 2012 and at that time we (a fellow student and myself) did not have any idea about the MicroFramework. We wrote it for an embedded target as best as we could, but were not sure which parts of C++ to include and infact ran it against an emulator that we wrote. Datastore was integrated into MF in early 2013 and was production ready only in early 2014.

I will fix these warnings when I start working on the next set of improvements to Datastore.