Skip to content

Commit

Permalink
Merge pull request #103 from lasselukkari/remove-due-pgm
Browse files Browse the repository at this point in the history
Fix compiler warnings
  • Loading branch information
lasselukkari authored Feb 18, 2021
2 parents 6c2f06f + 0e13d43 commit 8017d8f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=aWOT
version=3.2.3
version=3.2.4
author=Lasse Lukkari <lasse.lukkari@gmail.com>
maintainer=Lasse Lukkari <lasse.lukkari@gmail.com>
sentence=Arduino web server library.
Expand Down
2 changes: 1 addition & 1 deletion src/aWOT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -891,7 +891,7 @@ int Request::read(uint8_t* buf, size_t size) {
ret++;
}

int read = m_stream->read(buf, (size < m_left ? size : m_left));
int read = m_stream->read(buf, (size < (unsigned)m_left ? size : m_left));
if (read == -1) {
if (ret > 0) {
return ret;
Expand Down
8 changes: 2 additions & 6 deletions src/aWOT.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@
#define SERVER_MAX_HEADERS 10
#endif

#ifdef _VARIANT_ARDUINO_DUE_X_
#define pgm_read_byte(ptr) (unsigned char)(*ptr)
#endif

#define P(name) static const unsigned char name[] PROGMEM

class StreamClient : public Client {
Expand All @@ -76,8 +72,8 @@ class StreamClient : public Client {

public:
StreamClient(Stream* stream) : s(stream){};
int connect(IPAddress ip, uint16_t port){return 1;};
int connect(const char* host, uint16_t port){return 1;};
int connect(IPAddress, uint16_t){return 1;};
int connect(const char*, uint16_t){return 1;};
size_t write(uint8_t byte){return s->write(byte);};
size_t write(const uint8_t* buffer, size_t length){return s->write(buffer, length);};
int available(){return s->available();};
Expand Down

0 comments on commit 8017d8f

Please sign in to comment.