Skip to content

EEPROM compile warnings #3246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 22, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions libraries/EEPROM/src/EEPROM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <esp_log.h>

EEPROMClass::EEPROMClass(void)
: _handle(NULL)
: _handle(0)
, _data(0)
, _size(0)
, _dirty(false)
Expand All @@ -40,7 +40,7 @@ EEPROMClass::EEPROMClass(void)

EEPROMClass::EEPROMClass(uint32_t sector)
// Only for compatiility, no sectors in nvs!
: _handle(NULL)
: _handle(0)
, _data(0)
, _size(0)
, _dirty(false)
Expand All @@ -50,7 +50,7 @@ EEPROMClass::EEPROMClass(uint32_t sector)
}

EEPROMClass::EEPROMClass(const char* name, uint32_t user_defined_size)
: _handle(NULL)
: _handle(0)
, _data(0)
, _size(0)
, _dirty(false)
Expand All @@ -60,7 +60,7 @@ EEPROMClass::EEPROMClass(const char* name, uint32_t user_defined_size)
}

EEPROMClass::~EEPROMClass() {
// end();
end();
}

bool EEPROMClass::begin(size_t size) {
Expand Down Expand Up @@ -152,6 +152,9 @@ void EEPROMClass::end() {
}
_data = 0;
_size = 0;

nvs_close(_handle);
_handle = 0;
}

uint8_t EEPROMClass::read(int address) {
Expand Down