mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-17 12:20:35 +08:00
fix 'ignoring return value of function declared with warn_unused_result'
This commit is contained in:
committed by
Lorenz Meier
parent
1ae8483e2c
commit
0a79c809ad
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user