From 1a8bd15d983c3953d8611d9d7e9791f66e18487e Mon Sep 17 00:00:00 2001 From: Mark Charlebois Date: Sun, 3 May 2015 11:20:07 -0700 Subject: [PATCH] Minor cleanup of mixer changes Signed-off-by: Mark Charlebois --- makefiles/posix/config_posix_default.mk | 1 + src/systemcmds/mixer/mixer.cpp | 9 ++++++--- src/systemcmds/mixer/module.mk | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/makefiles/posix/config_posix_default.mk b/makefiles/posix/config_posix_default.mk index 8c2d84897a..d5c8d5be55 100644 --- a/makefiles/posix/config_posix_default.mk +++ b/makefiles/posix/config_posix_default.mk @@ -17,6 +17,7 @@ MODULES += modules/sensors # System commands # MODULES += systemcmds/param +MODULES += systemcmds/mixer MODULES += systemcmds/topic_listener # diff --git a/src/systemcmds/mixer/mixer.cpp b/src/systemcmds/mixer/mixer.cpp index 0e8eda9cf6..686a50f436 100644 --- a/src/systemcmds/mixer/mixer.cpp +++ b/src/systemcmds/mixer/mixer.cpp @@ -58,8 +58,8 @@ */ extern "C" __EXPORT int mixer_main(int argc, char *argv[]); -static void usage(const char *reason) noreturn_function; -static int load(const char *devname, const char *fname) noreturn_function; +static void usage(const char *reason); +static int load(const char *devname, const char *fname); int mixer_main(int argc, char *argv[]) @@ -70,8 +70,10 @@ mixer_main(int argc, char *argv[]) } if (!strcmp(argv[1], "load")) { - if (argc < 4) + if (argc < 4) { usage("missing device or filename"); + return 1; + } int ret = load(argv[2], argv[3]); if(ret !=0) { @@ -79,6 +81,7 @@ mixer_main(int argc, char *argv[]) return 1; } } + usage("Unknown command"); return 0; } diff --git a/src/systemcmds/mixer/module.mk b/src/systemcmds/mixer/module.mk index 0fb899c671..5d5cf84857 100644 --- a/src/systemcmds/mixer/module.mk +++ b/src/systemcmds/mixer/module.mk @@ -42,5 +42,7 @@ MODULE_STACKSIZE = 4096 MAXOPTIMIZATION = -Os +ifdef ($(PX4_TARGET_OS),nuttx) EXTRACXXFLAGS = -Wframe-larger-than=2048 +endif