Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Error on building : "HttpClient.cpp:87:61: error: logical not is only applied to the left hand side of comparison [-Werror=logical-not-parentheses] if (!iClient->connect(iServerName, iServerPort) > 0)" #97

Copy link
Copy link
Open
@genotix

Description

@genotix
Issue body actions

There is this Mobile library TinyGSM that uses that ArduinoHttpClient library for an HTTPS example.
I have been working to try and do a HTTPS PUT with the TTGO T-Call v1.4 ; an ESP32 WROVER-B with a SIM800L GPRS module.

I have tried this https://github.com/vshymanskyy/TinyGSM/blob/master/examples/HttpsClient/HttpsClient.ino but immediately receive the following error in Arduino IDE:

Warning: Board breadboard:avr:atmega328bb doesn't define a 'build.board' preference. Auto-set to: AVR_ATMEGA328BB
/Users/genotix/Documents/Arduino/libraries/ArduinoHttpClient-0.4.0/src/HttpClient.cpp: In member function 'int HttpClient::startRequest(const char*, const char*, const char*, int, const byte*)':
/Users/genotix/Documents/Arduino/libraries/ArduinoHttpClient-0.4.0/src/HttpClient.cpp:87:61: error: logical not is only applied to the left hand side of comparison [-Werror=logical-not-parentheses]
             if (!iClient->connect(iServerName, iServerPort) > 0)
                                                             ^
/Users/genotix/Documents/Arduino/libraries/ArduinoHttpClient-0.4.0/src/HttpClient.cpp:97:64: error: logical not is only applied to the left hand side of comparison [-Werror=logical-not-parentheses]
             if (!iClient->connect(iServerAddress, iServerPort) > 0)
                                                                ^
cc1plus: some warnings being treated as errors
exit status 1
Error compiling for board ESP32 Dev Module.

Since it is the demo example I am wondering what could be in err here.
Would appreciate any hints. :) 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: codeRelated to content of the project itselfRelated to content of the project itselftype: imperfectionPerceived defect in any part of projectPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.