public inbox for linux-rt-users@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] Fix -Wunused-result warnings by checking return values
@ 2025-07-12 13:42 Cheng-Yang Chou
  2025-07-12 13:42 ` [PATCH 1/8] rt-utils.c: Suppress warning Cheng-Yang Chou
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: Cheng-Yang Chou @ 2025-07-12 13:42 UTC (permalink / raw)
  To: williams, jkacur; +Cc: linux-rt-users, jserv, yphbchou0911

This patch series adds proper error checking to functions such as write(),
ftruncate(), and system(), whose return values were previously ignored.

These warnings were treated as errors under -Werror due to the
__attribute__((warn_unused_result)) annotation. Instead of suppressing
them with compiler flags, this series addresses each call site directly
to improve code robustness and clarity.

A full list of compiler warnings fixed in this series is available at:
  https://gist.github.com/EricccTaiwan/a78d6f1950d3cba27be757e405b6626a

Tested on Ubuntu 25.04 (GCC 14.2.0, glibc 2.41).

Thanks.

-chengyang

---

Cheng-Yang Chou (8):
  rt-utils.c: Suppress warning
  pmqtest.c: Suppress warning
  ptsematest.c: Suppress warning
  rt-migrate-test.c: Suppress warning
  cyclicdeadline.c: Suppress warning
  deadline_test.c: Suppress warning
  sigwaittest.c: Suppress warning
  svsematest.c: Suppress warning

 src/lib/rt-utils.c                    |  9 +++++--
 src/pmqtest/pmqtest.c                 |  6 ++++-
 src/ptsematest/ptsematest.c           |  6 ++++-
 src/rt-migrate-test/rt-migrate-test.c |  5 +++-
 src/sched_deadline/cyclicdeadline.c   | 32 +++++++++++++++++++----
 src/sched_deadline/deadline_test.c    | 37 +++++++++++++++++++++++----
 src/sigwaittest/sigwaittest.c         | 13 ++++++++--
 src/svsematest/svsematest.c           | 13 ++++++++--
 8 files changed, 102 insertions(+), 19 deletions(-)

-- 
2.48.1


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

end of thread, other threads:[~2025-07-25 18:21 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-12 13:42 [PATCH 0/8] Fix -Wunused-result warnings by checking return values Cheng-Yang Chou
2025-07-12 13:42 ` [PATCH 1/8] rt-utils.c: Suppress warning Cheng-Yang Chou
2025-07-25 18:04   ` John Kacur
2025-07-12 13:42 ` [PATCH 2/8] pmqtest.c: " Cheng-Yang Chou
2025-07-25 18:07   ` John Kacur
2025-07-12 13:42 ` [PATCH 3/8] ptsematest.c: " Cheng-Yang Chou
2025-07-25 18:09   ` John Kacur
2025-07-12 13:42 ` [PATCH 4/8] rt-migrate-test.c: " Cheng-Yang Chou
2025-07-25 18:10   ` John Kacur
2025-07-12 13:42 ` [PATCH 5/8] cyclicdeadline.c: " Cheng-Yang Chou
2025-07-12 13:42 ` [PATCH 6/8] deadline_test.c: " Cheng-Yang Chou
2025-07-12 13:42 ` [PATCH 7/8] sigwaittest.c: " Cheng-Yang Chou
2025-07-12 13:42 ` [PATCH 8/8] svsematest.c: " Cheng-Yang Chou
2025-07-25 18:16 ` [PATCH 0/8] Fix -Wunused-result warnings by checking return values John Kacur
2025-07-25 18:20   ` Cheng-Yang Chou

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