-
Notifications
You must be signed in to change notification settings - Fork 1
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
Warnings fix #56
base: main
Are you sure you want to change the base?
Warnings fix #56
Conversation
passing NULL to non-pointer argument fixed
@@ -87,7 +87,7 @@ void onGetConfig(AsyncWebServerRequest *request) | |||
doc["ip-method"] = config.getUInt("ip-method", DEFAULT_IP_METHOD); | |||
doc["ip"] = ip.toString(); | |||
doc["subnet"] = subnet.toString(); | |||
doc["gateway"] = gateway != NULL ? gateway.toString() : ""; | |||
doc["gateway"] = gateway != 0 ? gateway.toString() : ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gateway 0.0.0.0 will be "" then. Gateway 0.0.0.0 should be invalid anyway if im right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Can we do anything about this warning?
|
Also we have this warning:
It`s the same type i fixed above in this commit. I am not sure if my approach will break anything, so I will leave it at that. Please have a look at this. |
warning: passing NULL to non-pointer argument 2 of 'uint32_t Preferences::getUInt(const char*, uint32_t)' [-Wconversion-null]
@psxde pls check if this breaks functionality
changed 2 things to fix warnings.
Im not sure if this will work like i think, so pls check