Skip to content

Commit 938373c

Browse files
committed
fixes per review
1 parent 7188db4 commit 938373c

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/arduino_lmic_hal_configuration.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,14 @@ 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-
__attribute__((unused)) TxPowerPolicy_t policy,
101-
__attribute__((unused)) int8_t requestedPower,
102-
__attribute__((unused)) uint32_t frequency
100+
TxPowerPolicy_t policy,
101+
int8_t requestedPower,
102+
uint32_t frequency
103103
)
104104
{
105+
LMIC_API_PARAMETER(policy);
106+
LMIC_API_PARAMETER(requestedPower);
107+
LMIC_API_PARAMETER(frequency);
105108
// default: use PA_BOOST exclusively
106109
return TxPowerPolicy_t::PA_BOOST;
107110
}

src/lmic/lmic.c

Lines changed: 2 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 >= (ostime_t)(1 << 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) >= (u1_t)LENOF_TABLE(macCmdSize))
726+
if (((size_t)(macCmd - 2)) >= LENOF_TABLE(macCmdSize))
727727
return 0;
728728
return TABLE_GET_U1(macCmdSize, macCmd - 2);
729729
}

0 commit comments

Comments
 (0)