px4_log: Added documentation and handled unused variables

Added __attribute__ ((unused)) for variables used only for log
output and flagged as unused if the message log level is compiled out.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2015-06-17 17:11:21 -07:00
parent dad0526a99
commit 29a36da22c
4 changed files with 155 additions and 31 deletions
+1 -1
View File
@@ -361,7 +361,7 @@ int commander_main(int argc, char *argv[])
if (!strcmp(argv[1], "check")) {
int mavlink_fd_local = open(MAVLINK_LOG_DEVICE, 0);
int checkres = prearm_check(&status, mavlink_fd_local);
int checkres __attribute__ ((unused)) = prearm_check(&status, mavlink_fd_local);
close(mavlink_fd_local);
warnx("FINAL RESULT: %s", (checkres == 0) ? "OK" : "FAILED");
return 0;