Skip to content

Navigation Menu

Sign in
Appearance settings

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

Commit 9a5afdf

Browse filesBrowse files
authored
Fix -Wlogical-not-parentheses warning (arduino-libraries#79)
* Fix -Wlogical-not-parentheses warning The warning occurs because `operator!()` has higher precedence than `operator>()`. Alternatively, we can use: ``` iClient->connect(iServerAddress, iServerPort) <= 0 ```
1 parent 7f36561 commit 9a5afdf
Copy full SHA for 9a5afdf

File tree

1 file changed

+2
-2
lines changed
Filter options

1 file changed

+2
-2
lines changed

‎src/HttpClient.cpp

Copy file name to clipboardExpand all lines: src/HttpClient.cpp
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ int HttpClient::startRequest(const char* aURLPath, const char* aHttpMethod,
8484
{
8585
if (iServerName)
8686
{
87-
if (!iClient->connect(iServerName, iServerPort) > 0)
87+
if (!(iClient->connect(iServerName, iServerPort) > 0))
8888
{
8989
#ifdef LOGGING
9090
Serial.println("Connection failed");
@@ -94,7 +94,7 @@ int HttpClient::startRequest(const char* aURLPath, const char* aHttpMethod,
9494
}
9595
else
9696
{
97-
if (!iClient->connect(iServerAddress, iServerPort) > 0)
97+
if (!(iClient->connect(iServerAddress, iServerPort) > 0))
9898
{
9999
#ifdef LOGGING
100100
Serial.println("Connection failed");

0 commit comments

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