Fix warning -Wimplicit-fallthrough

This commit is contained in:
Julien Lecoeur
2017-12-05 20:41:23 +01:00
committed by Daniel Agar
parent b21af471ac
commit 9fb98dad3e
4 changed files with 9 additions and 2 deletions

View File

@@ -114,6 +114,8 @@ LIS3MDL_I2C::ioctl(unsigned operation, unsigned &arg)
case MAGIOCGEXTERNAL:
external();
/* FALLTHROUGH */
case DEVIOCGDEVICEID:
return CDev::ioctl(nullptr, operation, arg);

View File

@@ -242,6 +242,8 @@ MPU6000_SPI::ioctl(unsigned operation, unsigned &arg)
case ACCELIOCGEXTERNAL:
external();
/* FALLTHROUGH */
case DEVIOCGDEVICEID:
return CDev::ioctl(nullptr, operation, arg);

View File

@@ -170,6 +170,8 @@ MPU9250_SPI::ioctl(unsigned operation, unsigned &arg)
case ACCELIOCGEXTERNAL:
external();
/* FALLTHROUGH */
case DEVIOCGDEVICEID:
return CDev::ioctl(nullptr, operation, arg);

View File

@@ -379,7 +379,8 @@ ssize_t Mavlink2Dev::write(struct file *filp, const char *buffer, size_t buflen)
return 0;
}
//no break
/* FALLTHROUGH */
case ParserState::GotLength: {
_packet_len -= buflen;
int buf_free;
@@ -509,8 +510,8 @@ ssize_t RtpsDev::write(struct file *filp, const char *buffer, size_t buflen)
_parser_state = ParserState::GotLength;
lock(Write);
/* FALLTHROUGH */
//no break
case ParserState::GotLength: {
_packet_len -= buflen;
int buf_free;