Skip to content

Commit 7188db4

Browse files
committed
remove warnings
1 parent 4eb195e commit 7188db4

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

src/arduino_lmic_hal_configuration.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ class HalConfiguration_t
9797
// PA_BOOST mode. So that's our default. Override this
9898
// for the Murata module.
9999
virtual TxPowerPolicy_t getTxPowerPolicy(
100-
TxPowerPolicy_t policy,
101-
int8_t requestedPower,
102-
uint32_t frequency
100+
__attribute__((unused)) TxPowerPolicy_t policy,
101+
__attribute__((unused)) int8_t requestedPower,
102+
__attribute__((unused)) uint32_t frequency
103103
)
104104
{
105105
// default: use PA_BOOST exclusively

src/lmic/lmic.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ ostime_t calcAirTime (rps_t rps, u1_t plen) {
295295
//
296296

297297
static void setRxsyms (ostime_t rxsyms) {
298-
if (rxsyms >= (1u << 10u)) {
298+
if (rxsyms >= (ostime_t)(1 << 10u)) {
299299
LMIC.rxsyms = (1u << 10u) - 1;
300300
} else if (rxsyms < 0) {
301301
LMIC.rxsyms = 0;
@@ -723,7 +723,7 @@ static CONST_TABLE(u1_t, macCmdSize)[] = {
723723
static u1_t getMacCmdSize(u1_t macCmd) {
724724
if (macCmd < 2)
725725
return 0;
726-
if ((macCmd - 2) >= LENOF_TABLE(macCmdSize))
726+
if ((macCmd - 2) >= (u1_t)LENOF_TABLE(macCmdSize))
727727
return 0;
728728
return TABLE_GET_U1(macCmdSize, macCmd - 2);
729729
}
@@ -3080,6 +3080,8 @@ int LMIC_getNetworkTimeReference(lmic_time_reference_t *pReference) {
30803080
pReference->tNetwork = LMIC.netDeviceTime;
30813081
return 1;
30823082
}
3083+
#else
3084+
(void)pReference;
30833085
#endif // LMIC_ENABLE_DeviceTimeReq
30843086
return 0;
30853087
}

src/lmic/lmic_compliance.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ void acSetTimer(ostime_t delay) {
658658
os_setTimedCallback(&LMIC_Compliance.timerJob, os_getTime() + delay, timerExpiredCb);
659659
}
660660

661-
static void timerExpiredCb(osjob_t *j) {
661+
static void timerExpiredCb(__attribute__((unused)) osjob_t *j) {
662662
LMIC_Compliance.eventflags |= LMIC_COMPLIANCE_EVENT_TIMER_EXPIRED;
663663
fsmEval();
664664
}
@@ -733,7 +733,7 @@ static void acSendUplink(void) {
733733
}
734734
}
735735

736-
static void sendUplinkCompleteCb(void *pUserData, int fSuccess) {
736+
static void sendUplinkCompleteCb(__attribute__((unused)) void *pUserData, __attribute__((unused)) int fSuccess) {
737737
LMIC_Compliance.eventflags |= LMIC_COMPLIANCE_EVENT_UPLINK_COMPLETE;
738738
LMIC_COMPLIANCE_PRINTF("%s(%s)\n", __func__, LMICcompliance_txSuccessToString(fSuccess));
739739
fsmEvalDeferred();

0 commit comments

Comments
 (0)