Remove warnings

Change-Id: Ibe5c0a0b937cd595983317a8c08ff38ffee5977d
This commit is contained in:
Romain Goyet
2017-04-10 16:01:35 +02:00
parent d1db9b5d67
commit 081f2ce40a
2 changed files with 3 additions and 4 deletions

View File

@@ -47,8 +47,7 @@ void initCard() {
// 0xB7 = Pattern to see back in response
sendCommand(8, 0x1B7);
uint32_t response = SDIO.RESP(1)->get();
assert(response == 0x1B7);
assert(SDIO.RESP(1)->get() == 0x1B7);
}
void sendCommand(uint32_t cmd, uint32_t arg) {

View File

@@ -275,8 +275,8 @@ int Complex::convertFloatToTextPrivate(float f, char * buffer, int numberOfSigni
/* The number of digits in an integer is capped because the maximal integer is
* 2^31 - 1. As our mantissa is an integer, we assert that we stay beyond this
* threshold during computation. */
int numberMaximalOfCharsInInteger = log10f(powf(2, 31));
assert(availableCharsForMantissaWithoutSign - 1 < numberMaximalOfCharsInInteger);
assert(availableCharsForMantissaWithoutSign - 1 < log10f(powf(2, 31)));
int numberOfDigitBeforeDecimal = exponentInBase10 >= 0 || displayMode == FloatDisplayMode::Scientific ?
exponentInBase10 + 1 : 1;
float mantissa = roundf(f * powf(10.0f, availableCharsForMantissaWithoutSign - 1 - numberOfDigitBeforeDecimal));