Skip to content

Commit 77e3d01

Browse files
authored
Fix 32-bit compile warnings (speeduino#1357)
1 parent dca61ec commit 77e3d01

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

speeduino/comms_CAN.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,10 +442,8 @@ void obd_response(uint8_t PIDmode, uint8_t requestedPIDlow, uint8_t requestedPID
442442
uint16_t obdcalcB; //used in obd calcs
443443
uint16_t obdcalcC; //used in obd calcs
444444
uint16_t obdcalcD; //used in obd calcs
445-
uint32_t obdcalcE32; //used in calcs
446445
uint32_t obdcalcF32; //used in calcs
447446
uint16_t obdcalcG16; //used in calcs
448-
uint16_t obdcalcH16; //used in calcs
449447

450448
outMsg.len = 8;
451449
outMsg.flags.extended = 0; //Make sure to set this to standard

speeduino/corrections.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -659,8 +659,8 @@ byte correctionAFRClosedLoop(void)
659659
&& (currentStatus.O2 < configPage6.ego_max)
660660
&& (currentStatus.O2 > configPage6.ego_min)
661661
&& (currentStatus.runSecs > configPage6.ego_sdelay)
662-
&& (currentStatus.MAP <= (configPage9.egoMAPMax * 2U))
663-
&& (currentStatus.MAP >= (configPage9.egoMAPMin * 2U)) )
662+
&& (currentStatus.MAP <= (long)(configPage9.egoMAPMax * 2U))
663+
&& (currentStatus.MAP >= (long)(configPage9.egoMAPMin * 2U)) )
664664
{
665665
//Check which algorithm is used, simple or PID
666666
if (configPage6.egoAlgorithm == EGO_ALGORITHM_SIMPLE)

speeduino/engineProtection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ byte checkRevLimit(void)
5858
byte checkBoostLimit(void)
5959
{
6060
currentStatus.engineProtectBoostCut = (configPage6.engineProtectType != PROTECT_CUT_OFF)
61-
&& ((configPage6.boostCutEnabled > 0) && (currentStatus.MAP > (configPage6.boostLimit * 2U)) );
61+
&& ((configPage6.boostCutEnabled > 0) && (currentStatus.MAP > (long)(configPage6.boostLimit * 2U)) );
6262

6363
return currentStatus.engineProtectBoostCut;
6464
}

speeduino/logger.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,12 @@ byte buildSdCardStatus(const statuses &current)
125125
{
126126
bool bits[] = {
127127
current.sdCardPresent,
128-
current.sdCardType,
128+
current.sdCardType==1U,
129129
current.sdCardReady,
130130
current.sdCardLogging,
131131
current.sdCardError,
132132
false, // Unused
133-
current.sdCardFS,
133+
current.sdCardFS==1U,
134134
current.sdCardUnused,
135135
};
136136
return setStatusBits(0, bits);

0 commit comments

Comments
 (0)