Skip to content
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

Remove warnings, errors during host tests in CI #8358

Merged
merged 5 commits into from
Nov 2, 2021

Conversation

earlephilhower
Copy link
Collaborator

Debug strings often included format parameters which did not exactly match
the passed in format parameters, resulting in warnings in the host test build
process like

/home/runner/work/Arduino/Arduino/libraries/ESP8266WiFi/src/ESP8266WiFiAP.cpp:107:20: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
  107 |         DEBUG_WIFI("[AP] SSID length %u, too long or missing!\n", ssid_len);
      |                                                                   ~~~~~~~~
      |                                                                   |
      |                                                                   size_t {aka long unsigned int}

Fix by applying casting or PRxxx macros as appropriate.

Also, fix one debug message which was trying to use a String as a char *:

/home/runner/work/Arduino/Arduino/libraries/ESP8266WiFi/src/ESP8266WiFiMulti.cpp: In member function ‘wl_status_t ESP8266WiFiMulti::connectWiFiMulti(uint32_t)’:
/home/runner/work/Arduino/Arduino/libraries/ESP8266WiFi/src/ESP8266WiFiMulti.cpp:331:34: warning: format ‘%s’ expects argument of type ‘char*’, but argument 3 has type ‘String’ [-Wformat=]
  331 |                 DEBUG_WIFI_MULTI("[WIFIM] Connecting %s\n", ssid);

Debug strings often included format parameters which did not exactly match
the passed in format parameters, resulting in warnings in the host test build
process like
````
/home/runner/work/Arduino/Arduino/libraries/ESP8266WiFi/src/ESP8266WiFiAP.cpp:107:20: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 3 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
  107 |         DEBUG_WIFI("[AP] SSID length %u, too long or missing!\n", ssid_len);
      |                                                                   ~~~~~~~~
      |                                                                   |
      |                                                                   size_t {aka long unsigned int}
````

Fix by applying casting or PRxxx macros as appropriate.

Also, fix one debug message which was trying to use a `String` as a `char *`:
````
/home/runner/work/Arduino/Arduino/libraries/ESP8266WiFi/src/ESP8266WiFiMulti.cpp: In member function ‘wl_status_t ESP8266WiFiMulti::connectWiFiMulti(uint32_t)’:
/home/runner/work/Arduino/Arduino/libraries/ESP8266WiFi/src/ESP8266WiFiMulti.cpp:331:34: warning: format ‘%s’ expects argument of type ‘char*’, but argument 3 has type ‘String’ [-Wformat=]
  331 |                 DEBUG_WIFI_MULTI("[WIFIM] Connecting %s\n", ssid);
````
libraries/ESP8266HTTPClient/src/ESP8266HTTPClient.cpp Outdated Show resolved Hide resolved
libraries/ESP8266WiFi/src/ESP8266WiFi.cpp Outdated Show resolved Hide resolved
libraries/ESP8266mDNS/src/LEAmDNS_Helpers.cpp Outdated Show resolved Hide resolved
libraries/ESP8266mDNS/src/LEAmDNS_Structs.cpp Outdated Show resolved Hide resolved
libraries/SD/src/SD.h Outdated Show resolved Hide resolved
libraries/SDFS/src/SDFS.h Outdated Show resolved Hide resolved
Copy link
Collaborator

@d-a-v d-a-v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks !
Compilation on host is now clean !
🎉

@d-a-v d-a-v merged commit 7d971fa into esp8266:master Nov 2, 2021
@earlephilhower earlephilhower deleted the newhostfix branch November 2, 2021 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants