arduino-libraries / ArduinoHttpClient

Arduino HTTP Client library
282 stars 170 forks source link

Changed startRequest logic to fix compiler warning #108

Closed econeale closed 1 year ago

econeale commented 3 years ago

Changed the startRequest client checking logic to iClient->connect(iServerName, iServerPort) < 1 to fix the error referenced in #97 :

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)

This is a problem when using ESP32 with compiler warnings enabled as they set the -Werror option.

CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.

github-actions[bot] commented 3 years ago

Memory usage change @ 886048e371fc141ebb7000d29daef8043e17d630

Board flash % RAM for global variables %
arduino:samd:mkr1000 0 - 0 0.0 - 0.0 0 - 0 0.0 - 0.0
Click for full report table Board|examples/BasicAuthGet
flash|%|examples/BasicAuthGet
RAM for global variables|%|examples/CustomHeader
flash|%|examples/CustomHeader
RAM for global variables|%|examples/DweetGet
flash|%|examples/DweetGet
RAM for global variables|%|examples/DweetPost
flash|%|examples/DweetPost
RAM for global variables|%|examples/HueBlink
flash|%|examples/HueBlink
RAM for global variables|%|examples/PostWithHeaders
flash|%|examples/PostWithHeaders
RAM for global variables|%|examples/SimpleDelete
flash|%|examples/SimpleDelete
RAM for global variables|%|examples/SimpleGet
flash|%|examples/SimpleGet
RAM for global variables|%|examples/SimpleHttpExample
flash|%|examples/SimpleHttpExample
RAM for global variables|%|examples/SimplePost
flash|%|examples/SimplePost
RAM for global variables|%|examples/SimplePut
flash|%|examples/SimplePut
RAM for global variables|%|examples/SimpleWebSocket
flash|%|examples/SimpleWebSocket
RAM for global variables|% -|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|-|- arduino:samd:mkr1000|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0|0|0.0
Click for full report CSV ``` Board,examples/BasicAuthGet
flash,%,examples/BasicAuthGet
RAM for global variables,%,examples/CustomHeader
flash,%,examples/CustomHeader
RAM for global variables,%,examples/DweetGet
flash,%,examples/DweetGet
RAM for global variables,%,examples/DweetPost
flash,%,examples/DweetPost
RAM for global variables,%,examples/HueBlink
flash,%,examples/HueBlink
RAM for global variables,%,examples/PostWithHeaders
flash,%,examples/PostWithHeaders
RAM for global variables,%,examples/SimpleDelete
flash,%,examples/SimpleDelete
RAM for global variables,%,examples/SimpleGet
flash,%,examples/SimpleGet
RAM for global variables,%,examples/SimpleHttpExample
flash,%,examples/SimpleHttpExample
RAM for global variables,%,examples/SimplePost
flash,%,examples/SimplePost
RAM for global variables,%,examples/SimplePut
flash,%,examples/SimplePut
RAM for global variables,%,examples/SimpleWebSocket
flash,%,examples/SimpleWebSocket
RAM for global variables,% arduino:samd:mkr1000,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0,0,0.0 ```