All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabiano Rosas <farosas@suse.de>
To: Peter Maydell <peter.maydell@linaro.org>,
	qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: "Cédric Le Goater" <clg@kaod.org>,
	"Steven Lee" <steven_lee@aspeedtech.com>,
	"Troy Lee" <leetroy@gmail.com>,
	"Jamin Lin" <jamin_lin@aspeedtech.com>,
	"Andrew Jeffery" <andrew@codeconstruct.com.au>,
	"Joel Stanley" <joel@jms.id.au>
Subject: Re: [PATCH 0/2] tests/qtest: Avoid char arrays in some Arm tests
Date: Tue, 10 Mar 2026 12:50:14 -0300	[thread overview]
Message-ID: <878qbz1y6h.fsf@suse.de> (raw)
In-Reply-To: <20260310151507.2973843-1-peter.maydell@linaro.org>

Peter Maydell <peter.maydell@linaro.org> writes:

> This patchset fixes a couple of problems reported by Fabiano Rosas
> with gcc 7.5.0 now we have turned on -Wformat-overflow=2. In both
> cases the test is using sprintf() into a fixed-size char array, and
> it can't actually overflow but gcc doesn't realize that. We prefer
> to use g_strdup_printf() for this kind of thing anyway, as it is
> much less error-prone, so switch to that.
>
> thanks
> -- PMM
>
> Peter Maydell (2):
>   tests/qtest/ast2700-sgpio-test: Use g_strdup_printf() instead of char
>     arrays
>   tests/qtest/arm-cpu-features: Use g_strdup_printf() instead of char
>     arrays
>
>  tests/qtest/arm-cpu-features.c   | 24 +++++++++++++++---------
>  tests/qtest/ast2700-sgpio-test.c | 24 ++++++++++++------------
>  2 files changed, 27 insertions(+), 21 deletions(-)

Series:

Tested-by: Fabiano Rosas <farosas@suse.de>


  parent reply	other threads:[~2026-03-10 15:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-10 15:15 [PATCH 0/2] tests/qtest: Avoid char arrays in some Arm tests Peter Maydell
2026-03-10 15:15 ` [PATCH 1/2] tests/qtest/ast2700-sgpio-test: Use g_strdup_printf() instead of char arrays Peter Maydell
2026-03-10 15:15 ` [PATCH 2/2] tests/qtest/arm-cpu-features: " Peter Maydell
2026-03-10 15:30   ` Philippe Mathieu-Daudé
2026-03-10 15:50 ` Fabiano Rosas [this message]
2026-03-10 15:59 ` [PATCH 0/2] tests/qtest: Avoid char arrays in some Arm tests Cédric Le Goater

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=878qbz1y6h.fsf@suse.de \
    --to=farosas@suse.de \
    --cc=andrew@codeconstruct.com.au \
    --cc=clg@kaod.org \
    --cc=jamin_lin@aspeedtech.com \
    --cc=joel@jms.id.au \
    --cc=leetroy@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=steven_lee@aspeedtech.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.