Skip to content

Fix warning -Wempty-body by adding braces to 'if' stmt body #2951

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jul 9, 2019

Conversation

MartyMacGyver
Copy link
Contributor

This resolves the following build warning when using WiFi:

[...]\hardware\espressif\esp32\libraries\WiFi\src\WiFiGeneric.cpp: In static member function 'static esp_err_t WiFiGenericClass::_eventCallback(void*, system_event_t*)':

[...]\hardware\espressif\esp32\libraries\WiFi\src\WiFiGeneric.cpp:336:107: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]

     if(event->event_id < 26) log_d("Event: %d - %s", event->event_id, system_event_names[event->event_id]);

@MartyMacGyver MartyMacGyver force-pushed the mff-fix-build-warning branch from 319507f to 86a1065 Compare July 2, 2019 05:27
@me-no-dev me-no-dev merged commit 4ee17ec into espressif:master Jul 9, 2019
@me-no-dev
Copy link
Member

good catch!

@MartyMacGyver MartyMacGyver deleted the mff-fix-build-warning branch July 10, 2019 02:47
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants