AP_HAL_Linux: ignore unused result on panic

There's not much we can do if the write() call inside a panic function
failed. Just ignore the failure.
This commit is contained in:
Lucas De Marchi 2016-06-21 16:42:17 -03:00
parent 8a58c06adb
commit b687473174
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@
#include <sys/time.h>
#include <unistd.h>
#include <AP_Common/AP_Common.h>
#include <AP_HAL/AP_HAL.h>
#include <AP_HAL/system.h>
#include <AP_HAL_Linux/Scheduler.h>
@ -27,7 +28,7 @@ void panic(const char *errormsg, ...)
va_start(ap, errormsg);
vdprintf(1, errormsg, ap);
va_end(ap);
write(1, "\n", 1);
UNUSED_RESULT(write(1, "\n", 1));
hal.rcin->deinit();
hal.scheduler->delay_microseconds(10000);