selftests/sched_ext: Fix unused-result warning for read()
Status from this message: Applied to sched_ext/for-7.0-fixes.
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | selftests/sched_ext: Fix unused-result warning for read()tools/ | +2 | 1 reply | |
| 1/1 | selftests/sched_ext: Fix unused-result warning for read()tools/ | +2 | 0 replies |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by.
| Patch | Andrea Righi |
|---|---|
| 1/1 | R-b R-b |
| 1/1 | R-b R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/1] selftests/sched_ext: Fix unused-result warning for read()
The build fails under -Werror because read() ignores its return value, triggering a warn_unused_result compiler error:
init_enable_count.c: In function ‘run_test’:
init_enable_count.c:60:25: error: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]
60 | read(pipe_fds[0], &buf, 1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~cc1: all warnings being treated as error
Check the return value of read() to satisfy the compiler and catch unexpected pipe failures.
Thanks,
cheng-yang
---
Cheng-Yang Chou (1):
selftests/sched_ext: Fix unused-result warning for read()
tools/testing/selftests/sched_ext/init_enable_count.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
2.48.1