Skip to content

Commit 03fa885

Browse files
authored
Merge pull request #344 from pennam/fix_warnings
Fix compilation warnings
2 parents 90508ac + 5ab7d89 commit 03fa885

File tree

6 files changed

+11
-8
lines changed

6 files changed

+11
-8
lines changed

src/tls/BearSSLClient.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,8 @@ class BearSSLClient : public Client {
9090
Client* _client;
9191
const br_x509_trust_anchor* _TAs;
9292
int _numTAs;
93-
GetTimeCallbackFunc _get_time_func;
94-
9593
bool _noSNI;
94+
GetTimeCallbackFunc _get_time_func;
9695

9796
br_ec_private_key _ecKey;
9897
br_x509_certificate _ecCert;

src/tls/profile/aiotc_profile.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ void aiotc_client_profile_init(br_ssl_client_context *cc, br_x509_minimal_contex
5151
BR_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
5252
};
5353

54-
int id;
55-
5654
/*
5755
* Reset client context and set supported versions from TLS-1.0
5856
* to TLS-1.2 (inclusive).

src/tls/utility/Cert.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,12 @@ class ArduinoIoTCloudCertClass {
147147
byte data[CERT_COMPRESSED_CERT_SLOT_LENGTH + CERT_SERIAL_NUMBER_LENGTH + CERT_AUTHORITY_KEY_ID_LENGTH];
148148
} _compressedCert;
149149

150-
/* only raw EC X Y values 64 byte */
151-
const byte * _publicKey;
152-
153150
byte * _certBuffer;
154151
int _certBufferLen;
155152

153+
/* only raw EC X Y values 64 byte */
154+
const byte * _publicKey;
155+
156156
int versionLength();
157157
int issuerOrSubjectLength(const CertInfo& issuerOrSubjectData);
158158
int sequenceHeaderLength(int length);

src/utility/ota/OTA-samd.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,12 @@ int samd_onOTARequest(char const * ota_url)
5757

5858
/* Perform the reset to reboot to SxU. */
5959
NVIC_SystemReset();
60+
61+
return static_cast<int>(OTAError::None);
6062
#endif /* OTA_STORAGE_SNU */
63+
64+
(void)ota_url;
65+
return static_cast<int>(OTAError::DownloadFailed);
6166
}
6267

6368
#endif /* ARDUINO_ARCH_SAMD */

src/utility/time/NTPUtils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class NTPUtils
5454
static int const MAX_NTP_PORT = 65535;
5555
#endif
5656
static unsigned long const NTP_TIMEOUT_MS = 1000;
57-
static char constexpr * NTP_TIME_SERVER = "time.arduino.cc";
57+
static constexpr const char * NTP_TIME_SERVER = "time.arduino.cc";
5858

5959
static void sendNTPpacket(UDP & udp);
6060
};

src/utility/watchdog/Watchdog.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ void watchdog_reset()
173173
void watchdog_enable_network_feed(const bool use_ethernet)
174174
{
175175
#ifdef WIFI_HAS_FEED_WATCHDOG_FUNC
176+
(void)use_ethernet;
176177
WiFi.setFeedWatchdogFunc(watchdog_reset);
177178
#endif
178179

0 commit comments

Comments
 (0)