1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-27 21:16:50 +03:00

Fixing a few compiler warnings to allow compilation with -Wall -Wextra and -Werror. (#3153)

This commit is contained in:
Trygve Laugstøl 2017-05-08 11:56:08 +02:00 committed by Ivan Grokhotkov
parent db4d3e0098
commit 2d9e767630
3 changed files with 2 additions and 3 deletions

View File

@ -132,7 +132,6 @@ bool HTTPClient::begin(String url)
bool HTTPClient::beginInternal(String url, const char* expectedProtocol) bool HTTPClient::beginInternal(String url, const char* expectedProtocol)
{ {
DEBUG_HTTPCLIENT("[HTTP-Client][begin] url: %s\n", url.c_str()); DEBUG_HTTPCLIENT("[HTTP-Client][begin] url: %s\n", url.c_str());
bool hasPort = false;
clear(); clear();
// check for : (http: or https: // check for : (http: or https:

View File

@ -601,7 +601,7 @@ bool WiFiClientSecure::loadPrivateKey(Stream& stream, size_t size)
extern "C" int __ax_port_read(int fd, uint8_t* buffer, size_t count) extern "C" int __ax_port_read(int fd, uint8_t* buffer, size_t count)
{ {
ClientContext* _client = SSLContext::getIOContext(fd); ClientContext* _client = SSLContext::getIOContext(fd);
if (!_client || _client->state() != ESTABLISHED && !_client->getSize()) { if (!_client || (_client->state() != ESTABLISHED && !_client->getSize())) {
errno = EIO; errno = EIO;
return -1; return -1;
} }

View File

@ -63,7 +63,7 @@
#ifndef LWIP_NOASSERT #ifndef LWIP_NOASSERT
#define LWIP_ASSERT(message, assertion) do { if(!(assertion)) \ #define LWIP_ASSERT(message, assertion) do { if(!(assertion)) \
LWIP_PLATFORM_ASSERT(message); } while(0) { LWIP_PLATFORM_ASSERT(message); } } while(0)
#else /* LWIP_NOASSERT */ #else /* LWIP_NOASSERT */
#define LWIP_ASSERT(message, assertion) #define LWIP_ASSERT(message, assertion)
#endif /* LWIP_NOASSERT */ #endif /* LWIP_NOASSERT */