mirror of
				https://github.com/KevinMidboe/TinyGSM.git
				synced 2025-10-29 18:00:18 +00:00 
			
		
		
		
	Fix all Wextra warnings
This commit is contained in:
		| @@ -161,18 +161,32 @@ public: | ||||
|  | ||||
|   bool init(const char* pin = NULL) { | ||||
|     DBG(GF("### TinyGSM Version:"), TINYGSM_VERSION); | ||||
|  | ||||
|     if (!testAT()) { | ||||
|       return false; | ||||
|     } | ||||
|  | ||||
|     sendAT(GF("&FZ"));  // Factory + Reset | ||||
|     waitResponse(); | ||||
|  | ||||
|     sendAT(GF("E0"));   // Echo Off | ||||
|     if (waitResponse() != 1) { | ||||
|       return false; | ||||
|     } | ||||
|  | ||||
|     DBG(GF("### Modem:"), getModemName()); | ||||
|     getSimStatus(); | ||||
|     return true; | ||||
|  | ||||
|     int ret = getSimStatus(); | ||||
|     // if the sim isn't ready and a pin has been provided, try to unlock the sim | ||||
|     if (ret != SIM_READY && pin != NULL && strlen(pin) > 0) { | ||||
|       simUnlock(pin); | ||||
|       return (getSimStatus() == SIM_READY); | ||||
|     } | ||||
|     // if the sim is ready, or it's locked but no pin has been provided, return | ||||
|     // true | ||||
|     else { | ||||
|       return (ret == SIM_READY || ret == SIM_LOCKED); | ||||
|     } | ||||
|   } | ||||
|  | ||||
|   String getModemName() { | ||||
| @@ -563,9 +577,9 @@ TINY_GSM_MODEM_GET_GPRS_IP_CONNECTED() | ||||
| protected: | ||||
|  | ||||
|   bool modemConnect(const char* host, uint16_t port, uint8_t mux, | ||||
|                     bool ssl = false, int timeout_s = 75) | ||||
|  { | ||||
|     uint32_t timeout_ms = ((uint32_t)timeout_s)*1000; | ||||
|                    bool ssl = false, int timeout_s = 75) { | ||||
|    if (ssl) DBG("SSL not yet supported on this module!"); | ||||
|    uint32_t timeout_ms = ((uint32_t)timeout_s) * 1000; | ||||
|     sendAT(GF("+QIOPEN="), mux, GF("\"TCP"), GF("\",\""), host, GF("\","), port); | ||||
|     int rsp = waitResponse(timeout_ms, | ||||
|                            GF("CONNECT OK" GSM_NL), | ||||
|   | ||||
		Reference in New Issue
	
	Block a user