compiler warning sanitizations

This commit is contained in:
Klaus K Wilting 2020-04-10 22:56:17 +02:00
parent 438b3485e5
commit a6cbc2479e
4 changed files with 36 additions and 26 deletions

View File

@ -206,7 +206,7 @@ uint8_t GetCharWidth(char cChar) {
}
void ScrollMatrixLeft(uint8_t *buf, const uint16_t cols, const uint16_t rows) {
uint32_t i, k, idx;
uint32_t i, k, idx = 0;
const uint32_t x = cols / 8;
for (k = 0; k < rows; k++) {

View File

@ -22,6 +22,12 @@
#define LMIC_USE_INTERRUPTS 1
#endif
// avoid lmic warning if we don't configure radio because we don't have one
#define CFG_sx1276_radio 1
#if ! (defined(CFG_sx1272_radio) || defined(CFG_sx1276_radio))
#define CFG_sx1276_radio 1
#endif
// time sync via LoRaWAN network, note: not supported by TTNv2
#define LMIC_ENABLE_DeviceTimeReq 1

View File

@ -170,6 +170,8 @@ void timesync_store(uint32_t timestamp, timesync_t timestamp_type) {
// callback function to receive time answer from network or answer
void IRAM_ATTR timesync_serverAnswer(void *pUserData, int flag) {
#if (TIME_SYNC_LORASERVER) || (TIME_SYNC_LORAWAN)
// if no timesync handshake is pending then exit
if (!timeSyncPending)
return;
@ -269,4 +271,6 @@ Exit:
// inform processing task
xTaskNotify(timeSyncProcTask, (rc ? rcv_seqNo : TIME_SYNC_END_FLAG),
eSetBits);
#endif // (TIME_SYNC_LORASERVER) || (TIME_SYNC_LORAWAN)
}