mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-26 15:20:34 +08:00
GCC fixes for warnings
GCC was more picky about prototypes for inlines being required. The generate_listener.py script used incorrect printf formats and was casting %f params to float, but printf casts all %f params to double per the spec. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -363,6 +363,14 @@ static void usage()
|
||||
PX4_WARN("Publish sensors combined: simulator start -p");
|
||||
}
|
||||
|
||||
__BEGIN_DECLS
|
||||
extern int simulator_main(int argc, char *argv[]);
|
||||
extern void led_init(void);
|
||||
extern void led_on(int led);
|
||||
extern void led_off(int led);
|
||||
extern void led_toggle(int led);
|
||||
__END_DECLS
|
||||
|
||||
extern "C" {
|
||||
|
||||
int simulator_main(int argc, char *argv[])
|
||||
@@ -418,13 +426,6 @@ int simulator_main(int argc, char *argv[])
|
||||
|
||||
}
|
||||
|
||||
__BEGIN_DECLS
|
||||
extern void led_init(void);
|
||||
extern void led_on(int led);
|
||||
extern void led_off(int led);
|
||||
extern void led_toggle(int led);
|
||||
__END_DECLS
|
||||
|
||||
bool static _led_state[2] = { false , false };
|
||||
|
||||
__EXPORT void led_init()
|
||||
|
||||
Reference in New Issue
Block a user