fix 'ignoring return value of function declared with warn_unused_result'

This commit is contained in:
Thomas Gubler
2015-09-27 11:38:05 +02:00
committed by Lorenz Meier
parent 1ae8483e2c
commit 0a79c809ad
+12 -3
View File
@@ -233,7 +233,10 @@ esc_calib_main(int argc, char *argv[])
ret = poll(&fds, 1, 0);
if (ret > 0) {
read(0, &c, 1);
if (read(0, &c, 1) <= 0) {
printf("ESC calibration read error\n");
return 0;
}
if (c == 'y' || c == 'Y') {
break;
@@ -315,7 +318,10 @@ esc_calib_main(int argc, char *argv[])
ret = poll(&fds, 1, 0);
if (ret > 0) {
read(0, &c, 1);
if (read(0, &c, 1) <= 0) {
printf("ESC calibration read error\n");
goto done;
}
if (c == 13) {
break;
@@ -352,7 +358,10 @@ esc_calib_main(int argc, char *argv[])
ret = poll(&fds, 1, 0);
if (ret > 0) {
read(0, &c, 1);
if (read(0, &c, 1) <= 0) {
printf("ESC calibration read error\n");
goto done;
}
if (c == 13) {
break;