Skip to content

Commit

Permalink
Cleanup warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieucarbou committed Nov 4, 2024
1 parent 1580286 commit 74a46cd
Show file tree
Hide file tree
Showing 22 changed files with 44 additions and 45 deletions.
2 changes: 1 addition & 1 deletion src/TinyGsmClientA6.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class TinyGsmA6 : public TinyGsmModem<TinyGsmA6>,
}

public:
virtual int connect(const char* host, uint16_t port, int timeout_s) {
virtual int connect(const char* host, uint16_t port, int32_t timeout_s) {
stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down
4 changes: 2 additions & 2 deletions src/TinyGsmClientA7608.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class TinyGsmA7608 : public TinyGsmModem<TinyGsmA7608>,
}

public:
virtual int connect(const char* host, uint16_t port, int timeout_s) {
virtual int connect(const char* host, uint16_t port, int32_t timeout_s) {
// stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down Expand Up @@ -158,7 +158,7 @@ class TinyGsmA7608 : public TinyGsmModem<TinyGsmA7608>,
{}
public:
int connect(const char* host, uint16_t port, int timeout_s) override {
int connect(const char* host, uint16_t port, int32_t timeout_s) override {
stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down
4 changes: 2 additions & 2 deletions src/TinyGsmClientA7670.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class TinyGsmA7670 : public TinyGsmModem<TinyGsmA7670>,
}

public:
virtual int connect(const char* host, uint16_t port, int timeout_s) {
virtual int connect(const char* host, uint16_t port, int32_t timeout_s) {
// stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down Expand Up @@ -157,7 +157,7 @@ class TinyGsmA7670 : public TinyGsmModem<TinyGsmA7670>,
{}
public:
int connect(const char* host, uint16_t port, int timeout_s) override {
int connect(const char* host, uint16_t port, int32_t timeout_s) override {
stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down
4 changes: 2 additions & 2 deletions src/TinyGsmClientBG96.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class TinyGsmBG96 : public TinyGsmModem<TinyGsmBG96>,
}

public:
virtual int connect(const char* host, uint16_t port, int timeout_s) {
virtual int connect(const char* host, uint16_t port, int32_t timeout_s) {
stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down Expand Up @@ -140,7 +140,7 @@ class TinyGsmBG96 : public TinyGsmModem<TinyGsmBG96>,
public:
int connect(const char* host, uint16_t port, int timeout_s) override {
int connect(const char* host, uint16_t port, int32_t timeout_s) override {
stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down
4 changes: 2 additions & 2 deletions src/TinyGsmClientESP8266.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class TinyGsmESP8266 : public TinyGsmModem<TinyGsmESP8266>,
}

public:
virtual int connect(const char* host, uint16_t port, int timeout_s) {
virtual int connect(const char* host, uint16_t port, int32_t timeout_s) {
stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down Expand Up @@ -115,7 +115,7 @@ class TinyGsmESP8266 : public TinyGsmModem<TinyGsmESP8266>,
: GsmClientESP8266(modem, mux) {}

public:
int connect(const char* host, uint16_t port, int timeout_s) override {
int connect(const char* host, uint16_t port, int32_t timeout_s) override {
stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down
2 changes: 1 addition & 1 deletion src/TinyGsmClientM590.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class TinyGsmM590 : public TinyGsmModem<TinyGsmM590>,
}

public:
virtual int connect(const char* host, uint16_t port, int timeout_s) {
virtual int connect(const char* host, uint16_t port, int32_t timeout_s) {
stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down
4 changes: 2 additions & 2 deletions src/TinyGsmClientM95.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class TinyGsmM95 : public TinyGsmModem<TinyGsmM95>,
}

public:
virtual int connect(const char* host, uint16_t port, int timeout_s) {
virtual int connect(const char* host, uint16_t port, int32_t timeout_s) {
stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down Expand Up @@ -134,7 +134,7 @@ class TinyGsmM95 : public TinyGsmModem<TinyGsmM95>,
public:
int connect(const char* host, uint16_t port, int timeout_s) override {
int connect(const char* host, uint16_t port, int32_t timeout_s) override {
stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down
4 changes: 2 additions & 2 deletions src/TinyGsmClientMC60.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class TinyGsmMC60 : public TinyGsmModem<TinyGsmMC60>,
}

public:
virtual int connect(const char* host, uint16_t port, int timeout_s) {
virtual int connect(const char* host, uint16_t port, int32_t timeout_s) {
stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down Expand Up @@ -133,7 +133,7 @@ class TinyGsmMC60 : public TinyGsmModem<TinyGsmMC60>,
public:
int connect(const char* host, uint16_t port, int timeout_s) override {
int connect(const char* host, uint16_t port, int32_t timeout_s) override {
stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down
4 changes: 2 additions & 2 deletions src/TinyGsmClientSIM5360.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class TinyGsmSim5360 : public TinyGsmModem<TinyGsmSim5360>,
}

public:
virtual int connect(const char* host, uint16_t port, int timeout_s) {
virtual int connect(const char* host, uint16_t port, int32_t timeout_s) {
stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down Expand Up @@ -134,7 +134,7 @@ class TinyGsmSim5360 : public TinyGsmModem<TinyGsmSim5360>,
: GsmClientSim5360(modem, mux) {}
public:
int connect(const char* host, uint16_t port, int timeout_s) override {
int connect(const char* host, uint16_t port, int32_t timeout_s) override {
stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down
2 changes: 1 addition & 1 deletion src/TinyGsmClientSIM7000.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class TinyGsmSim7000 : public TinyGsmSim70xx<TinyGsmSim7000>,
}

public:
virtual int connect(const char* host, uint16_t port, int timeout_s) {
virtual int connect(const char* host, uint16_t port, int32_t timeout_s) {
stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down
2 changes: 1 addition & 1 deletion src/TinyGsmClientSIM7000SSL.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class TinyGsmSim7000SSL
}

public:
virtual int connect(const char* host, uint16_t port, int timeout_s) {
virtual int connect(const char* host, uint16_t port, int32_t timeout_s) {
stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down
4 changes: 2 additions & 2 deletions src/TinyGsmClientSIM7020.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class TinyGsmSim7020 : public TinyGsmModem<TinyGsmSim7020>,
}

public:
virtual int connect(const char *host, uint16_t port, int timeout_s)
virtual int connect(const char *host, uint16_t port, int32_t timeout_s)
{
stop();
TINY_GSM_YIELD();
Expand Down Expand Up @@ -143,7 +143,7 @@ class TinyGsmSim7020 : public TinyGsmModem<TinyGsmSim7020>,
: GsmClientSim7020(modem, mux) {}

public:
int connect(const char *host, uint16_t port, int timeout_s) override
int connect(const char *host, uint16_t port, int32_t timeout_s) override
{
stop();
TINY_GSM_YIELD();
Expand Down
5 changes: 2 additions & 3 deletions src/TinyGsmClientSIM7080.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class TinyGsmSim7080 : public TinyGsmSim70xx<TinyGsmSim7080>,
}

public:
virtual int connect(const char* host, uint16_t port, int timeout_s) {
virtual int connect(const char* host, uint16_t port, int32_t timeout_s) {
stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down Expand Up @@ -100,8 +100,7 @@ class TinyGsmSim7080 : public TinyGsmSim70xx<TinyGsmSim7080>,
return at->setCertificate(certificateName, mux);
}

virtual int connect(const char* host, uint16_t port,
int timeout_s) override {
virtual int connect(const char* host, uint16_t port, int32_t timeout_s) override {
stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down
4 changes: 2 additions & 2 deletions src/TinyGsmClientSIM7600.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class TinyGsmSim7600 : public TinyGsmModem<TinyGsmSim7600>,
}

public:
virtual int connect(const char* host, uint16_t port, int timeout_s) {
virtual int connect(const char* host, uint16_t port, int32_t timeout_s) {
stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down Expand Up @@ -149,7 +149,7 @@ class TinyGsmSim7600 : public TinyGsmModem<TinyGsmSim7600>,
{}
public:
int connect(const char* host, uint16_t port, int timeout_s) override {
int connect(const char* host, uint16_t port, int32_t timeout_s) override {
stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down
4 changes: 2 additions & 2 deletions src/TinyGsmClientSIM7672.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class TinyGsmSim7672 : public TinyGsmModem<TinyGsmSim7672>,
}

public:
virtual int connect(const char* host, uint16_t port, int timeout_s) {
virtual int connect(const char* host, uint16_t port, int32_t timeout_s) {
stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down Expand Up @@ -150,7 +150,7 @@ class TinyGsmSim7672 : public TinyGsmModem<TinyGsmSim7672>,
{}
public:
int connect(const char* host, uint16_t port, int timeout_s) override {
int connect(const char* host, uint16_t port, int32_t timeout_s) override {
stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down
4 changes: 2 additions & 2 deletions src/TinyGsmClientSIM800.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class TinyGsmSim800 : public TinyGsmModem<TinyGsmSim800>,
}

public:
virtual int connect(const char* host, uint16_t port, int timeout_s) {
virtual int connect(const char* host, uint16_t port, int32_t timeout_s) {
stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down Expand Up @@ -135,7 +135,7 @@ class TinyGsmSim800 : public TinyGsmModem<TinyGsmSim800>,
: GsmClientSim800(modem, mux) {}

public:
int connect(const char* host, uint16_t port, int timeout_s) override {
int connect(const char* host, uint16_t port, int32_t timeout_s) override {
stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down
8 changes: 4 additions & 4 deletions src/TinyGsmClientSaraR4.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class TinyGsmSaraR4 : public TinyGsmModem<TinyGsmSaraR4>,
}

public:
virtual int connect(const char* host, uint16_t port, int timeout_s) {
virtual int connect(const char* host, uint16_t port, int32_t timeout_s) {
// stop(); // DON'T stop!
TINY_GSM_YIELD();
rx.clear();
Expand All @@ -113,7 +113,7 @@ class TinyGsmSaraR4 : public TinyGsmModem<TinyGsmSaraR4>,

return sock_connected;
}
virtual int connect(IPAddress ip, uint16_t port, int timeout_s) {
virtual int connect(IPAddress ip, uint16_t port, int32_t timeout_s) {
return connect(TinyGsmStringFromIp(ip).c_str(), port, timeout_s);
}
int connect(const char* host, uint16_t port) override {
Expand Down Expand Up @@ -177,7 +177,7 @@ class TinyGsmSaraR4 : public TinyGsmModem<TinyGsmSaraR4>,
: GsmClientSaraR4(modem, mux) {}

public:
int connect(const char* host, uint16_t port, int timeout_s) override {
int connect(const char* host, uint16_t port, int32_t timeout_s) override {
// stop(); // DON'T stop!
TINY_GSM_YIELD();
rx.clear();
Expand All @@ -191,7 +191,7 @@ class TinyGsmSaraR4 : public TinyGsmModem<TinyGsmSaraR4>,
at->maintain();
return sock_connected;
}
int connect(IPAddress ip, uint16_t port, int timeout_s) override {
int connect(IPAddress ip, uint16_t port, int32_t timeout_s) override {
return connect(TinyGsmStringFromIp(ip).c_str(), port, timeout_s);
}
int connect(const char* host, uint16_t port) override {
Expand Down
4 changes: 2 additions & 2 deletions src/TinyGsmClientSequansMonarch.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class TinyGsmSequansMonarch
}

public:
virtual int connect(const char* host, uint16_t port, int timeout_s) {
virtual int connect(const char* host, uint16_t port, int32_t timeout_s) {
if (sock_connected) stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down Expand Up @@ -146,7 +146,7 @@ class TinyGsmSequansMonarch
bool strictSSL = false;

public:
int connect(const char* host, uint16_t port, int timeout_s) override {
int connect(const char* host, uint16_t port, int32_t timeout_s) override {
stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down
4 changes: 2 additions & 2 deletions src/TinyGsmClientUBLOX.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class TinyGsmUBLOX : public TinyGsmModem<TinyGsmUBLOX>,
}

public:
virtual int connect(const char* host, uint16_t port, int timeout_s) {
virtual int connect(const char* host, uint16_t port, int32_t timeout_s) {
// stop(); // DON'T stop!
TINY_GSM_YIELD();
rx.clear();
Expand Down Expand Up @@ -144,7 +144,7 @@ class TinyGsmUBLOX : public TinyGsmModem<TinyGsmUBLOX>,
: GsmClientUBLOX(modem, mux) {}

public:
int connect(const char* host, uint16_t port, int timeout_s) override {
int connect(const char* host, uint16_t port, int32_t timeout_s) override {
// stop(); // DON'T stop!
TINY_GSM_YIELD();
rx.clear();
Expand Down
8 changes: 4 additions & 4 deletions src/TinyGsmClientXBee.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class TinyGsmXBee : public TinyGsmModem<TinyGsmXBee>,
// The TCP connection itself is not opened until you attempt to send data.
// Because all settings are saved to flash, it is possible (or likely) that
// you could send data even if you haven't "made" any connection.
virtual int connect(const char* host, uint16_t port, int timeout_s) {
virtual int connect(const char* host, uint16_t port, int32_t timeout_s) {
// NOTE: Not caling stop() or yeild() here
at->streamClear(); // Empty anything in the buffer before starting
sock_connected = at->modemConnect(host, port, mux, false, timeout_s);
Expand All @@ -124,7 +124,7 @@ class TinyGsmXBee : public TinyGsmModem<TinyGsmXBee>,
return connect(host, port, 75);
}

virtual int connect(IPAddress ip, uint16_t port, int timeout_s) {
virtual int connect(IPAddress ip, uint16_t port, int32_t timeout_s) {
if (timeout_s != 0) {
DBG("Timeout [", timeout_s, "] doesn't apply here.");
}
Expand Down Expand Up @@ -260,7 +260,7 @@ class TinyGsmXBee : public TinyGsmModem<TinyGsmXBee>,
: GsmClientXBee(modem, mux) {}

public:
int connect(const char* host, uint16_t port, int timeout_s) override {
int connect(const char* host, uint16_t port, int32_t timeout_s) override {
// NOTE: Not caling stop() or yeild() here
at->streamClear(); // Empty anything in the buffer before starting
sock_connected = at->modemConnect(host, port, mux, true, timeout_s);
Expand All @@ -270,7 +270,7 @@ class TinyGsmXBee : public TinyGsmModem<TinyGsmXBee>,
return connect(host, port, 75);
}

int connect(IPAddress ip, uint16_t port, int timeout_s) override {
int connect(IPAddress ip, uint16_t port, int32_t timeout_s) override {
if (timeout_s != 0) {
DBG("Timeout [", timeout_s, "] doesn't apply here.");
}
Expand Down
2 changes: 1 addition & 1 deletion src/TinyGsmSSL.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class TinyGsmSSL {
: GsmClientSim800(modem, mux) {}

public:
int connect(const char* host, uint16_t port, int timeout_s) overide {
int connect(const char* host, uint16_t port, int32_t timeout_s) overide {
stop();
TINY_GSM_YIELD();
rx.clear();
Expand Down
6 changes: 3 additions & 3 deletions src/TinyGsmTCP.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
// Because of the ordering of resolution of overrides in templates, these need
// to be written out every time. This macro is to shorten that.
#define TINY_GSM_CLIENT_CONNECT_OVERRIDES \
int connect(IPAddress ip, uint16_t port, int timeout_s) { \
int connect(IPAddress ip, uint16_t port, int32_t timeout_s) override { \
return connect(TinyGsmStringFromIp(ip).c_str(), port, timeout_s); \
} \
int connect(const char* host, uint16_t port) override { \
Expand Down Expand Up @@ -73,11 +73,11 @@ class TinyGsmTCP {

public:
// bool init(modemType* modem, uint8_t);
// int connect(const char* host, uint16_t port, int timeout_s);
// int connect(const char* host, uint16_t port, int32_t timeout_s);

// Connect to a IP address given as an IPAddress object by
// converting said IP address to text
// virtual int connect(IPAddress ip,uint16_t port, int timeout_s) {
// virtual int connect(IPAddress ip,uint16_t port, int32_t timeout_s) {
// return connect(TinyGsmStringFromIp(ip).c_str(), port,
// timeout_s);
// }
Expand Down

0 comments on commit 74a46cd

Please sign in to comment.