diff --git a/makefiles/toolchain_native.mk b/makefiles/toolchain_native.mk index f790940b89..83a9fe5856 100644 --- a/makefiles/toolchain_native.mk +++ b/makefiles/toolchain_native.mk @@ -61,7 +61,7 @@ CLANGVER= endif endif -#USE_GCC=1 +USE_GCC=0 ifeq ($(USE_GCC),1) # GCC Options: @@ -162,6 +162,8 @@ ARCHWARNINGS += -Wdouble-promotion \ -Wlogical-op \ -Wformat=1 \ -Werror=unused-but-set-variable \ + -Wno-error=unused-local-typedefs \ + -Wno-error=enum-compare \ -Werror=double-promotion ARCHOPTIMIZATION += -fno-strength-reduce endif diff --git a/src/platforms/linux/px4_layer/px4_linux_impl.cpp b/src/platforms/linux/px4_layer/px4_linux_impl.cpp index a0620ce296..973b85abda 100644 --- a/src/platforms/linux/px4_layer/px4_linux_impl.cpp +++ b/src/platforms/linux/px4_layer/px4_linux_impl.cpp @@ -49,39 +49,17 @@ __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); __END_DECLS extern struct wqueue_s gwork[NWORKERS]; -void sighandler(int sig) -{ - printf("Received sig %d\n", sig); -} - namespace px4 { 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); // Create high priority worker thread diff --git a/src/systemcmds/param/param.c b/src/systemcmds/param/param.c index 2c74e4b312..30baaeb49c 100644 --- a/src/systemcmds/param/param.c +++ b/src/systemcmds/param/param.c @@ -182,7 +182,7 @@ static int do_save(const char *param_file_name) { /* 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) { warn("opening '%s' failed", param_file_name);