mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 07:03:35 +08:00
turn on -Werror and fix resulting errors
This commit is contained in:
@@ -121,7 +121,7 @@ int ardrone_interface_main(int argc, char *argv[])
|
||||
SCHED_PRIORITY_MAX - 15,
|
||||
1100,
|
||||
ardrone_interface_thread_main,
|
||||
(argv) ? (const char **)&argv[2] : (const char **)NULL);
|
||||
(argv) ? (char * const *)&argv[2] : (char * const *)NULL);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "board_config.h"
|
||||
|
||||
#include <arch/board/board.h>
|
||||
#include <systemlib/err.h>
|
||||
|
||||
/*
|
||||
* Ideally we'd be able to get these from up_internal.h,
|
||||
@@ -54,7 +55,7 @@
|
||||
* CONFIG_ARCH_LEDS configuration switch.
|
||||
*/
|
||||
__BEGIN_DECLS
|
||||
extern void led_init();
|
||||
extern void led_init(void);
|
||||
extern void led_on(int led);
|
||||
extern void led_off(int led);
|
||||
extern void led_toggle(int led);
|
||||
|
||||
@@ -221,7 +221,7 @@ int frsky_telemetry_main(int argc, char *argv[])
|
||||
SCHED_PRIORITY_DEFAULT,
|
||||
2000,
|
||||
frsky_telemetry_thread_main,
|
||||
(const char **)argv);
|
||||
(char * const *)argv);
|
||||
|
||||
while (!thread_running) {
|
||||
usleep(200);
|
||||
|
||||
@@ -214,7 +214,7 @@ hott_sensors_main(int argc, char *argv[])
|
||||
SCHED_PRIORITY_DEFAULT,
|
||||
1024,
|
||||
hott_sensors_thread_main,
|
||||
(argv) ? (const char **)&argv[2] : (const char **)NULL);
|
||||
(argv) ? (char * const *)&argv[2] : (char * const *)NULL);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -240,7 +240,7 @@ hott_telemetry_main(int argc, char *argv[])
|
||||
SCHED_PRIORITY_DEFAULT,
|
||||
2048,
|
||||
hott_telemetry_thread_main,
|
||||
(argv) ? (const char **)&argv[2] : (const char **)NULL);
|
||||
(argv) ? (char * const *)&argv[2] : (char * const *)NULL);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -40,3 +40,5 @@ MODULE_COMMAND = px4flow
|
||||
SRCS = px4flow.cpp
|
||||
|
||||
MAXOPTIMIZATION = -Os
|
||||
|
||||
EXTRACXXFLAGS = -Wno-attributes
|
||||
|
||||
@@ -106,7 +106,7 @@ struct i2c_frame {
|
||||
};
|
||||
struct i2c_frame f;
|
||||
|
||||
typedef struct i2c_integral_frame {
|
||||
struct i2c_integral_frame {
|
||||
uint16_t frame_count_since_last_readout;
|
||||
int16_t pixel_flow_x_integral;
|
||||
int16_t pixel_flow_y_integral;
|
||||
|
||||
@@ -109,7 +109,7 @@ int roboclaw_main(int argc, char *argv[])
|
||||
SCHED_PRIORITY_MAX - 10,
|
||||
2048,
|
||||
roboclaw_thread_main,
|
||||
(const char **)argv);
|
||||
(char * const *)argv);
|
||||
exit(0);
|
||||
|
||||
} else if (!strcmp(argv[1], "test")) {
|
||||
|
||||
@@ -206,7 +206,7 @@ static const uint8_t crc_table[] = {
|
||||
0xfa, 0xfd, 0xf4, 0xf3
|
||||
};
|
||||
|
||||
uint8_t crc8(uint8_t *p, uint8_t len){
|
||||
static uint8_t crc8(uint8_t *p, uint8_t len) {
|
||||
uint16_t i;
|
||||
uint16_t crc = 0x0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user