All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Thomas Huth" <thuth@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>
Subject: [PATCH-for-9.0? v2 4/4] meson: Enable -Wstatic-in-inline
Date: Tue, 26 Mar 2024 18:10:09 +0100	[thread overview]
Message-ID: <20240326171009.26696-5-philmd@linaro.org> (raw)
In-Reply-To: <20240326171009.26696-1-philmd@linaro.org>

Compilers are clever enough to inline code when necessary.

The only case we accept an inline function is static in
header (we use C, not C++).

Add the -Wstatic-in-inline CPPFLAG to prevent public and
inline function to be added in the code base.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20240313184954.42513-5-philmd@linaro.org>
---
 meson.build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meson.build b/meson.build
index c9c3217ba4..f400f7d36c 100644
--- a/meson.build
+++ b/meson.build
@@ -591,6 +591,7 @@ warn_flags = [
   '-Wold-style-definition',
   '-Wredundant-decls',
   '-Wshadow=local',
+  '-Wstatic-in-inline',
   '-Wstrict-prototypes',
   '-Wtype-limits',
   '-Wundef',
-- 
2.41.0



  parent reply	other threads:[~2024-03-26 17:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26 17:10 [PATCH-for-9.0? v2 0/4] overall: Avoid using inlined functions with external linkage again Philippe Mathieu-Daudé
2024-03-26 17:10 ` [PATCH-for-9.0? v2 1/4] hw/arm/smmu: " Philippe Mathieu-Daudé
2024-03-26 17:33   ` Eric Auger
2024-03-26 17:10 ` [PATCH-for-9.0? v2 2/4] accel/hvf: Un-inline hvf_arch_supports_guest_debug() Philippe Mathieu-Daudé
2024-03-26 17:10 ` [PATCH-for-9.0? v2 3/4] qtest/libqos: Reduce size_to_prdtl() declaration scope Philippe Mathieu-Daudé
2024-03-26 17:19   ` Peter Maydell
2024-03-26 17:24   ` Thomas Huth
2024-03-26 17:10 ` Philippe Mathieu-Daudé [this message]
2024-03-26 17:28   ` [PATCH-for-9.0? v2 4/4] meson: Enable -Wstatic-in-inline Thomas Huth
2024-03-27  7:49     ` Philippe Mathieu-Daudé
2024-03-27  9:26   ` Paolo Bonzini
2024-03-27 12:42     ` Philippe Mathieu-Daudé
2024-03-27 14:12       ` Paolo Bonzini

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=20240326171009.26696-5-philmd@linaro.org \
    --to=philmd@linaro.org \
    --cc=berrange@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=thuth@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.