From: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>
Subject: [PATCH 0/2] Add QEMU_WARN_UNUSED_RESULT function attribute
Date: Fri, 10 Nov 2023 11:16:37 +0200 [thread overview]
Message-ID: <cover.1699606819.git.manos.pitsidianakis@linaro.org> (raw)
Functions that return a value to indicate success or failure can be
decorated with the warn_unused_result attribute. GCC will stop
compilation if a caller does not check the return value after calling
such a function. This was not possible to spot statically before, but
Coverity detects this kind of bug. I was prompted by
https://lore.kernel.org/qemu-devel/CAFEAcA_TS-B0gc-DUYT6BaKnm8Uauhsx3rW2dmVNUgTToVjSJg@mail.gmail.com/
to prevent this from happening in the future.
This patch series depends on
<20231109162034.2108018-1-manos.pitsidianakis@linaro.org>
https://lore.kernel.org/qemu-devel/20231109162034.2108018-1-manos.pitsidianakis@linaro.org/
Manos Pitsidianakis (2):
Add QEMU_WARN_UNUSED_RESULT attribute
Add warn_unused_result attr to AUD_register_card
audio/audio.h | 2 +-
hw/arm/omap2.c | 8 +++++++-
hw/input/tsc210x.c | 8 +++++++-
include/qemu/compiler.h | 14 ++++++++++++++
4 files changed, 29 insertions(+), 3 deletions(-)
base-commit: ad6ef0a42e314a8c6ac6c96d5f6e607a1e5644b5
prerequisite-patch-id: 484ec9f7f6109c10d4be0484fe8e3c2550c415f4
--
2.39.2
next reply other threads:[~2023-11-10 9:17 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-10 9:16 Manos Pitsidianakis [this message]
2023-11-10 9:16 ` [PATCH 1/2] Add QEMU_WARN_UNUSED_RESULT attribute Manos Pitsidianakis
2023-11-10 9:24 ` Daniel P. Berrangé
2023-11-10 11:15 ` Philippe Mathieu-Daudé
2023-11-10 9:16 ` [PATCH 2/2] Add warn_unused_result attr to AUD_register_card Manos Pitsidianakis
2023-11-10 10:21 ` Peter Maydell
2023-11-10 10:44 ` Manos Pitsidianakis
2023-11-10 11:18 ` Peter Maydell
2023-11-10 11:23 ` Daniel P. Berrangé
2023-11-10 11:28 ` Manos Pitsidianakis
2023-11-10 11:20 ` Daniel P. Berrangé
2023-11-10 11:25 ` Manos Pitsidianakis
2023-11-10 11:35 ` BALATON Zoltan
2023-11-10 11:43 ` Daniel P. Berrangé
2023-11-10 13:04 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1699606819.git.manos.pitsidianakis@linaro.org \
--to=manos.pitsidianakis@linaro.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).