On 3/10/26 16:15, Peter Maydell wrote:
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(-)


Reviewed-by: Cédric Le Goater <[email protected]>

Thanks,

C.


Reply via email to