-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
EEPROM class is throwing a warning: converting to non-pointer type 'nvs_handle {aka unsigned int}' from NULL #3142
Comments
Works correctly, just throwing the warning? |
I havent tested all of the functions. Writing and getting data to EEPROM seems to be working properly. |
Just tried to replicate this with the eeprom_class.ino example and I am not getting any warnings. I have enabled all the warnings on the Preferences menu. Mind sharing your test code? |
Thanks for checking! The EEPROM functions I'm using are located here: https://github.com/CircuitSetup/Split-Single-Phase-Energy-Meter/blob/master/Software/EmonESP/src/config.cpp I wouldn't doubt if it's something simple that I'm missing since nothing was changed between 1.0.2 to 1.0.3 rc2 |
Oh, it definitely is an issue. I will fix it, just don't have time to test right now. It will make it into the 1.0.4 release. |
What specifically would this be affecting? |
It will make the message go away. As mentioned in the message, it is a warning. |
@CircuitSetup, thanks for the link, I will take a look at it and use the 1.0.3 rc2 branch, I test it only with the 1.0.2 stable. @lbernstone, cool, I was planning to try to understand the issue and fix it. I am more familiar with C code, so, is the issue because of the initializer list on the EEPROM constructor? The 0 should have a UL at the end to let the compiler know to treat the 0 as an uint32_t value? |
It says exactly what the issue is, even though it points to the wrong line of code. I am treating nvs_handle like a pointer, but it is a uint32_t, which should not be set to NULL. |
Silly me, i was looking at |
Hardware:
Board: ESP32 Dev Module
Core Installation version: 1.0.3-rc2
IDE name: Arduino IDE
Flash Frequency: 40Mhz
PSRAM enabled: no
Upload Speed: 115200
Computer OS: Windows 10
Description:
The constructor for the EEPROM class is throwing a warning when compiling:
The text was updated successfully, but these errors were encountered: