Skip to content

Commit

Permalink
Minor cleanup of mixer changes
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
  • Loading branch information
mcharleb committed May 3, 2015
1 parent 1b985ab commit 1a8bd15
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions makefiles/posix/config_posix_default.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ MODULES += modules/sensors
# System commands
#
MODULES += systemcmds/param
MODULES += systemcmds/mixer
MODULES += systemcmds/topic_listener

#
Expand Down
9 changes: 6 additions & 3 deletions src/systemcmds/mixer/mixer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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[])
Expand All @@ -70,15 +70,18 @@ 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) {
warnx("failed to load mixer");
return 1;
}
}
usage("Unknown command");
return 0;
}

Expand Down
2 changes: 2 additions & 0 deletions src/systemcmds/mixer/module.mk
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,7 @@ MODULE_STACKSIZE = 4096

MAXOPTIMIZATION = -Os

ifdef ($(PX4_TARGET_OS),nuttx)
EXTRACXXFLAGS = -Wframe-larger-than=2048
endif

0 comments on commit 1a8bd15

Please sign in to comment.