public inbox for sched-ext@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH 0/1] selftests/sched_ext: Fix unused-result warning for read()
@ 2026-02-21 12:56 Cheng-Yang Chou
  2026-02-21 12:56 ` [PATCH 1/1] " Cheng-Yang Chou
  2026-02-23 17:57 ` [PATCH 0/1] " Tejun Heo
  0 siblings, 2 replies; 5+ messages in thread
From: Cheng-Yang Chou @ 2026-02-21 12:56 UTC (permalink / raw)
  To: sched-ext; +Cc: tj, void, arighi, changwoo, jserv, yphbchou0911

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(-)

-- 
2.48.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-02-23 17:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-21 12:56 [PATCH 0/1] selftests/sched_ext: Fix unused-result warning for read() Cheng-Yang Chou
2026-02-21 12:56 ` [PATCH 1/1] " Cheng-Yang Chou
2026-02-21 19:37   ` Andrea Righi
2026-02-22  8:25     ` Cheng-Yang Chou
2026-02-23 17:57 ` [PATCH 0/1] " Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox