Fix for a few -Wextra warnings.

This commit is contained in:
daid303 2012-11-12 15:35:28 +01:00
parent 72586eb30a
commit 43018a48c4
3 changed files with 18 additions and 14 deletions

View File

@ -1753,7 +1753,7 @@ void kill()
SERIAL_ERRORLNPGM(MSG_ERR_KILLED);
LCD_ALERTMESSAGEPGM(MSG_KILLED);
suicide();
while(1); // Wait for reset
while(1) { /* Intentionally left empty */ } // Wait for reset
}
void Stop()

View File

@ -42,7 +42,7 @@ static void spiInit(uint8_t spiRate) {
/** SPI receive a byte */
static uint8_t spiRec() {
SPDR = 0XFF;
while (!(SPSR & (1 << SPIF)));
while (!(SPSR & (1 << SPIF))) { /* Intentionally left empty */ }
return SPDR;
}
//------------------------------------------------------------------------------
@ -52,18 +52,18 @@ static inline __attribute__((always_inline))
if (nbyte-- == 0) return;
SPDR = 0XFF;
for (uint16_t i = 0; i < nbyte; i++) {
while (!(SPSR & (1 << SPIF)));
while (!(SPSR & (1 << SPIF))) { /* Intentionally left empty */ }
buf[i] = SPDR;
SPDR = 0XFF;
}
while (!(SPSR & (1 << SPIF)));
while (!(SPSR & (1 << SPIF))) { /* Intentionally left empty */ }
buf[nbyte] = SPDR;
}
//------------------------------------------------------------------------------
/** SPI send a byte */
static void spiSend(uint8_t b) {
SPDR = b;
while (!(SPSR & (1 << SPIF)));
while (!(SPSR & (1 << SPIF))) { /* Intentionally left empty */ }
}
//------------------------------------------------------------------------------
/** SPI send block - only one call so force inline */
@ -71,12 +71,12 @@ static inline __attribute__((always_inline))
void spiSendBlock(uint8_t token, const uint8_t* buf) {
SPDR = token;
for (uint16_t i = 0; i < 512; i += 2) {
while (!(SPSR & (1 << SPIF)));
while (!(SPSR & (1 << SPIF))) { /* Intentionally left empty */ }
SPDR = buf[i];
while (!(SPSR & (1 << SPIF)));
while (!(SPSR & (1 << SPIF))) { /* Intentionally left empty */ }
SPDR = buf[i + 1];
}
while (!(SPSR & (1 << SPIF)));
while (!(SPSR & (1 << SPIF))) { /* Intentionally left empty */ }
}
//------------------------------------------------------------------------------
#else // SOFTWARE_SPI
@ -174,7 +174,7 @@ uint8_t Sd2Card::cardCommand(uint8_t cmd, uint32_t arg) {
if (cmd == CMD12) spiRec();
// wait for response
for (uint8_t i = 0; ((status_ = spiRec()) & 0X80) && i != 0XFF; i++);
for (uint8_t i = 0; ((status_ = spiRec()) & 0X80) && i != 0XFF; i++) { /* Intentionally left empty */ }
return status_;
}
//------------------------------------------------------------------------------

View File

@ -246,7 +246,9 @@ void CardReader::openFile(char* name,bool read)
return;
}
else
;//SERIAL_ECHOLN("dive ok");
{
//SERIAL_ECHOLN("dive ok");
}
curDir=&myDir;
dirname_start=dirname_end+1;
@ -340,7 +342,9 @@ void CardReader::removeFile(char* name)
return;
}
else
;//SERIAL_ECHOLN("dive ok");
{
//SERIAL_ECHOLN("dive ok");
}
curDir=&myDir;
dirname_start=dirname_end+1;