Fix warning -Wimplicit-fallthrough

This commit is contained in:
Julien Lecoeur
2017-12-05 22:51:43 -05:00
committed by Daniel Agar
parent b21af471ac
commit 9fb98dad3e
4 changed files with 9 additions and 2 deletions
+2
View File
@@ -114,6 +114,8 @@ LIS3MDL_I2C::ioctl(unsigned operation, unsigned &arg)
case MAGIOCGEXTERNAL: case MAGIOCGEXTERNAL:
external(); external();
/* FALLTHROUGH */
case DEVIOCGDEVICEID: case DEVIOCGDEVICEID:
return CDev::ioctl(nullptr, operation, arg); return CDev::ioctl(nullptr, operation, arg);
+2
View File
@@ -242,6 +242,8 @@ MPU6000_SPI::ioctl(unsigned operation, unsigned &arg)
case ACCELIOCGEXTERNAL: case ACCELIOCGEXTERNAL:
external(); external();
/* FALLTHROUGH */
case DEVIOCGDEVICEID: case DEVIOCGDEVICEID:
return CDev::ioctl(nullptr, operation, arg); return CDev::ioctl(nullptr, operation, arg);
+2
View File
@@ -170,6 +170,8 @@ MPU9250_SPI::ioctl(unsigned operation, unsigned &arg)
case ACCELIOCGEXTERNAL: case ACCELIOCGEXTERNAL:
external(); external();
/* FALLTHROUGH */
case DEVIOCGDEVICEID: case DEVIOCGDEVICEID:
return CDev::ioctl(nullptr, operation, arg); return CDev::ioctl(nullptr, operation, arg);
@@ -379,7 +379,8 @@ ssize_t Mavlink2Dev::write(struct file *filp, const char *buffer, size_t buflen)
return 0; return 0;
} }
//no break /* FALLTHROUGH */
case ParserState::GotLength: { case ParserState::GotLength: {
_packet_len -= buflen; _packet_len -= buflen;
int buf_free; int buf_free;
@@ -509,8 +510,8 @@ ssize_t RtpsDev::write(struct file *filp, const char *buffer, size_t buflen)
_parser_state = ParserState::GotLength; _parser_state = ParserState::GotLength;
lock(Write); lock(Write);
/* FALLTHROUGH */
//no break
case ParserState::GotLength: { case ParserState::GotLength: {
_packet_len -= buflen; _packet_len -= buflen;
int buf_free; int buf_free;