mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
AP_HAL: fix warning due to missing prototype after HAL rework
This was introduced with the HAL rework: In file included from /p/ardupilot/libraries/AP_HAL/AP_HAL.h:11:0, from /p/ardupilot/ArduCopter/Copter.h:35, from /p/ardupilot/ArduCopter/ArduCopter.cpp:76: /p/ardupilot/ArduCopter/ArduCopter.cpp: In function 'int ArduPilot_main(int, char* const*)': /p/ardupilot/libraries/AP_HAL/AP_HAL_Main.h:11:26: warning: no previous declaration for 'int ArduPilot_main(int, char* const*)' [-Wmissing-declarations] #define AP_MAIN __EXPORT ArduPilot_main ^ It's due to PX4 using that warning as opposed to Linux. Since it harmless, add the prototype for everybody.
This commit is contained in:
parent
b326856635
commit
79dee5aaa9
@ -18,6 +18,7 @@
|
||||
#if CONFIG_MAIN_WITHOUT_ARGC_ARGV
|
||||
|
||||
#define AP_HAL_MAIN() extern "C" { \
|
||||
int AP_MAIN(void); \
|
||||
int AP_MAIN(void) { \
|
||||
AP_HAL::HAL::FunCallbacks callbacks(setup, loop); \
|
||||
hal.run(0, NULL, &callbacks); \
|
||||
@ -26,6 +27,7 @@
|
||||
}
|
||||
|
||||
#define AP_HAL_MAIN_CALLBACKS(CALLBACKS) extern "C" { \
|
||||
int AP_MAIN(void); \
|
||||
int AP_MAIN(void) { \
|
||||
hal.run(0, NULL, CALLBACKS); \
|
||||
return 0; \
|
||||
@ -35,6 +37,7 @@
|
||||
#else
|
||||
|
||||
#define AP_HAL_MAIN() extern "C" { \
|
||||
int AP_MAIN(int argc, char* const argv[]); \
|
||||
int AP_MAIN(int argc, char* const argv[]) { \
|
||||
AP_HAL::HAL::FunCallbacks callbacks(setup, loop); \
|
||||
hal.run(argc, argv, &callbacks); \
|
||||
@ -43,6 +46,7 @@
|
||||
}
|
||||
|
||||
#define AP_HAL_MAIN_CALLBACKS(CALLBACKS) extern "C" { \
|
||||
int AP_MAIN(int argc, char* const argv[]); \
|
||||
int AP_MAIN(int argc, char* const argv[]) { \
|
||||
hal.run(argc, argv, CALLBACKS); \
|
||||
return 0; \
|
||||
|
Loading…
Reference in New Issue
Block a user