mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 03:20:00 +03:00
Fixed build for gcc 8 (SITL).
This commit is contained in:
parent
b5fba14cb3
commit
93f933f01f
3 changed files with 10 additions and 4 deletions
|
@ -5,6 +5,12 @@
|
||||||
* under the terms of the MIT license. See LICENSE for details.
|
* under the terms of the MIT license. See LICENSE for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if __GNUC__ > 6
|
||||||
|
#define FALLTHROUGH __attribute__ ((fallthrough))
|
||||||
|
#else
|
||||||
|
#define FALLTHROUGH do {} while(0)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define _WIN32_WINNT 0x501
|
#define _WIN32_WINNT 0x501
|
||||||
#ifndef _CRT_SECURE_NO_WARNINGS
|
#ifndef _CRT_SECURE_NO_WARNINGS
|
||||||
|
@ -741,8 +747,8 @@ void dyad_update(void) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Fall through */
|
|
||||||
|
|
||||||
|
FALLTHROUGH;
|
||||||
case DYAD_STATE_CLOSING:
|
case DYAD_STATE_CLOSING:
|
||||||
if (select_has(&dyad_selectSet, SELECT_WRITE, stream->sockfd)) {
|
if (select_has(&dyad_selectSet, SELECT_WRITE, stream->sockfd)) {
|
||||||
stream_flushWriteBuffer(stream);
|
stream_flushWriteBuffer(stream);
|
||||||
|
|
|
@ -134,7 +134,7 @@ extern const uint8_t __pg_resetdata_end[];
|
||||||
|
|
||||||
#define PG_REGISTER_WITH_RESET_FN(_type, _name, _pgn, _version) \
|
#define PG_REGISTER_WITH_RESET_FN(_type, _name, _pgn, _version) \
|
||||||
extern void pgResetFn_ ## _name(_type *); \
|
extern void pgResetFn_ ## _name(_type *); \
|
||||||
PG_REGISTER_I(_type, _name, _pgn, _version, .reset = {.fn = (pgResetFunc*)&pgResetFn_ ## _name }) \
|
PG_REGISTER_I(_type, _name, _pgn, _version, .reset = {.fn = (pgResetFunc*)(void (*)())&pgResetFn_ ## _name }) \
|
||||||
/**/
|
/**/
|
||||||
|
|
||||||
#define PG_REGISTER_WITH_RESET_TEMPLATE(_type, _name, _pgn, _version) \
|
#define PG_REGISTER_WITH_RESET_TEMPLATE(_type, _name, _pgn, _version) \
|
||||||
|
@ -163,7 +163,7 @@ extern const uint8_t __pg_resetdata_end[];
|
||||||
|
|
||||||
#define PG_REGISTER_ARRAY_WITH_RESET_FN(_type, _size, _name, _pgn, _version) \
|
#define PG_REGISTER_ARRAY_WITH_RESET_FN(_type, _size, _name, _pgn, _version) \
|
||||||
extern void pgResetFn_ ## _name(_type *); \
|
extern void pgResetFn_ ## _name(_type *); \
|
||||||
PG_REGISTER_ARRAY_I(_type, _size, _name, _pgn, _version, .reset = {.fn = (pgResetFunc*)&pgResetFn_ ## _name}) \
|
PG_REGISTER_ARRAY_I(_type, _size, _name, _pgn, _version, .reset = {.fn = (pgResetFunc*)(void (*)())&pgResetFn_ ## _name}) \
|
||||||
/**/
|
/**/
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
|
@ -476,8 +476,8 @@ static uint16_t getRxfailValue(uint8_t channel)
|
||||||
return rxConfig()->rx_min_usec;
|
return rxConfig()->rx_min_usec;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* no break */
|
|
||||||
|
|
||||||
|
FALLTHROUGH;
|
||||||
default:
|
default:
|
||||||
case RX_FAILSAFE_MODE_INVALID:
|
case RX_FAILSAFE_MODE_INVALID:
|
||||||
case RX_FAILSAFE_MODE_HOLD:
|
case RX_FAILSAFE_MODE_HOLD:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue