All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] tests/qtest: Avoid char arrays in some Arm tests
@ 2026-03-10 15:15 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
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Peter Maydell @ 2026-03-10 15:15 UTC (permalink / raw)
  To: qemu-arm, qemu-devel
  Cc: Fabiano Rosas, Cédric Le Goater, Steven Lee, Troy Lee,
	Jamin Lin, Andrew Jeffery, Joel Stanley

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

-- 
2.43.0



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

end of thread, other threads:[~2026-03-10 15:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 0/2] tests/qtest: Avoid char arrays in some Arm tests Fabiano Rosas
2026-03-10 15:59 ` Cédric Le Goater

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.