mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-06 06:43:21 +08:00
Fixed gcc 4.8 warnings
Disabled gcc warnings that are tripped by Eigen. Removed signal code that is not needed in Linux port and was causing gcc warnings. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -61,7 +61,7 @@ CLANGVER=
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#USE_GCC=1
|
USE_GCC=0
|
||||||
|
|
||||||
ifeq ($(USE_GCC),1)
|
ifeq ($(USE_GCC),1)
|
||||||
# GCC Options:
|
# GCC Options:
|
||||||
@@ -162,6 +162,8 @@ ARCHWARNINGS += -Wdouble-promotion \
|
|||||||
-Wlogical-op \
|
-Wlogical-op \
|
||||||
-Wformat=1 \
|
-Wformat=1 \
|
||||||
-Werror=unused-but-set-variable \
|
-Werror=unused-but-set-variable \
|
||||||
|
-Wno-error=unused-local-typedefs \
|
||||||
|
-Wno-error=enum-compare \
|
||||||
-Werror=double-promotion
|
-Werror=double-promotion
|
||||||
ARCHOPTIMIZATION += -fno-strength-reduce
|
ARCHOPTIMIZATION += -fno-strength-reduce
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -49,39 +49,17 @@
|
|||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
|
|
||||||
// FIXME - This needs to be properly initialized
|
|
||||||
struct param_info_s param_array[256];
|
|
||||||
struct param_info_s *param_info_base;
|
|
||||||
struct param_info_s *param_info_limit;
|
|
||||||
|
|
||||||
long PX4_TICKS_PER_SEC = sysconf(_SC_CLK_TCK);
|
long PX4_TICKS_PER_SEC = sysconf(_SC_CLK_TCK);
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
extern struct wqueue_s gwork[NWORKERS];
|
extern struct wqueue_s gwork[NWORKERS];
|
||||||
|
|
||||||
void sighandler(int sig)
|
|
||||||
{
|
|
||||||
printf("Received sig %d\n", sig);
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace px4
|
namespace px4
|
||||||
{
|
{
|
||||||
|
|
||||||
void init(int argc, char *argv[], const char *app_name)
|
void init(int argc, char *argv[], const char *app_name)
|
||||||
{
|
{
|
||||||
int ret;
|
|
||||||
struct sigaction actions;
|
|
||||||
|
|
||||||
memset(&actions, 0, sizeof(actions));
|
|
||||||
sigemptyset(&actions.sa_mask);
|
|
||||||
actions.sa_flags = 0;
|
|
||||||
actions.sa_handler = sighandler;
|
|
||||||
ret = sigaction(SIGUSR2,&actions,NULL);
|
|
||||||
|
|
||||||
if (ret < 0) {
|
|
||||||
printf("sigaction failed: %d\n", errno);
|
|
||||||
}
|
|
||||||
printf("App name: %s\n", app_name);
|
printf("App name: %s\n", app_name);
|
||||||
|
|
||||||
// Create high priority worker thread
|
// Create high priority worker thread
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ static int
|
|||||||
do_save(const char *param_file_name)
|
do_save(const char *param_file_name)
|
||||||
{
|
{
|
||||||
/* create the file */
|
/* create the file */
|
||||||
int fd = open(param_file_name, O_WRONLY | O_CREAT);
|
int fd = open(param_file_name, O_WRONLY | O_CREAT, 0x777);
|
||||||
|
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
warn("opening '%s' failed", param_file_name);
|
warn("opening '%s' failed", param_file_name);
|
||||||
|
|||||||
Reference in New Issue
Block a user