Skip to content

Recent update (2.3.0) gives some warnings #2183

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

Closed
dandandandandandandan opened this issue Jun 23, 2016 · 4 comments
Closed

Recent update (2.3.0) gives some warnings #2183

dandandandandandandan opened this issue Jun 23, 2016 · 4 comments

Comments

@dandandandandandandan
Copy link

Basic Infos

Hardware

Hardware: NodeMCU 0.9
Core Version: 2.3.0

Description

During verbose compilation in the Arduino IDE the new 2.3.0 version gives me some warnings

Settings in IDE

Module: NodeMCU 0.9
Flash Size: 4MB/3MB
CPU Frequency: 80Mhz
Upload Using: SERIAL
Reset Method: nodemcu

Debug Messages

esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp: In function 'int ax_port_read(int, uint8_t*, size_t)':

hardware\esp8266\2.3.0\libraries\ESP8266WiFi\src\WiFiClientSecure.cpp:539:53: warning: suggest parentheses around '&&' within '||' [-Wparentheses]

 if (!_client || _client->state() != ESTABLISHED && !_client->getSize()) {

                                                 ^

\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266HTTPClient\src\ESP8266HTTPClient.cpp: In member function 'bool HTTPClient::beginInternal(String, const char*)':

\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266HTTPClient\src\ESP8266HTTPClient.cpp:135:10: warning: unused variable 'hasPort' [-Wunused-variable]

 bool hasPort = false;

      ^

\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266\Schedule.cpp:17:13: warning: 'void init_lists()' defined but not used [-Wunused-function]

static void init_lists()

         ^
@juansta
Copy link

juansta commented Aug 26, 2016

In addition to the above I am also seeing additional warnings on compilation

.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266mDNS/ESP8266mDNS.cpp: In member function 'void MDNSResponder::_parsePacket()':
.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266mDNS/ESP8266mDNS.cpp:590:18: warning: unused variable 'answerPrio' [-Wunused-variable]
uint16_t answerPrio = _conn_read16(); // Read priority
^
.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266mDNS/ESP8266mDNS.cpp:591:18: warning: unused variable 'answerWeight' [-Wunused-variable]
uint16_t answerWeight = _conn_read16(); // Read weight
^
.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266mDNS/ESP8266mDNS.cpp:558:16: warning: unused variable 'answerClass' [-Wunused-variable]
uint16_t answerClass = _conn_read16(); // Read class
^
.arduino15/packages/esp8266/hardware/esp8266/2.3.0/libraries/ESP8266mDNS/ESP8266mDNS.cpp:559:16: warning: unused variable 'answerTtl' [-Wunused-variable]
uint32_t answerTtl = _conn_read32(); // Read ttl
^

juansta added a commit to juansta/Arduino that referenced this issue Aug 26, 2016
To remove warnings as per esp8266#2183
juansta added a commit to juansta/Arduino that referenced this issue Aug 26, 2016
We do not want to check state() nor getSize() if _client is NULL.

Removed warnings as per esp8266#2183
juansta added a commit to juansta/Arduino that referenced this issue Aug 26, 2016
Checked for usage within repository using `grep -rnw . -e "init_lists"`. No occurances (excepting this one) found, however, have kept as separate commit for exclusion is required.

Removed warnings as per esp8266#2183
@arantius
Copy link

I also keep verbose warnings on when developing, and I want zero of them. I get: https://gist.github.com/arantius/e786224529a17782d23fa03df250b925

Here's my attempt to address some of them: master...arantius:build-warnings

@devyte
Copy link
Collaborator

devyte commented Oct 16, 2017

@igrr @juansta what is the status of this? I see the referenced PR is not merged, and I still see the referenced code with unused vars. OTOH, I haven't seen build warning, although I haven't really been paying attention to core messages, either.

@kubark42
Copy link

kubark42 commented Nov 3, 2017

This would be nice to clean up, it prevents the use of a project-wide -Werror -Wall. I agree with @arantius, it's very important to have all compiler warnings eliminated when deploying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants