Skip to content

Commit 8017555

Browse files
committed
#968: further workaround to defeat optimization
1 parent e11bd50 commit 8017555

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lmic/lmic.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2608,7 +2608,8 @@ static void engineUpdate_inner (void) {
26082608
// otherwise the compiler falsely assumes that the computation
26092609
// is positive.
26102610
//
2611-
if( ((ostime_t) (txbeg - (now + TX_RAMPUP))) < 0 ) {
2611+
volatile ostime_t tdiff = txbeg - (now + TX_RAMPUP);
2612+
if( tdiff < 0 ) {
26122613
// We could send right now!
26132614
txbeg = now;
26142615
dr_t txdr = (dr_t)LMIC.datarate;

0 commit comments

Comments
 (0)