On Wed, 4 Nov 2026 at 14:54, Philippe Mathieu-Daudé
<[email protected]> wrote:
>
> Replace sprintf() by safer snprintf() to fill the QOM path and
> property names. This silences when using Apple clang 17.0.0:
>
>   ../tests/qtest/npcm7xx_adc-test.c:140:5: warning: 'sprintf' is deprecated 
> [-Wdeprecated-declarations]
>   ../tests/qtest/npcm7xx_adc-test.c:322:9: warning: 'sprintf' is deprecated 
> [-Wdeprecated-declarations]
>   ../tests/qtest/npcm7xx_pwm-test.c:244:5: warning: 'sprintf' is deprecated 
> [-Wdeprecated-declarations]
>   ../tests/qtest/npcm7xx_pwm-test.c:245:5: warning: 'sprintf' is deprecated 
> [-Wdeprecated-declarations]
>   ../tests/qtest/npcm7xx_pwm-test.c:255:5: warning: 'sprintf' is deprecated 
> [-Wdeprecated-declarations]
>   ../tests/qtest/npcm7xx_pwm-test.c:256:5: warning: 'sprintf' is deprecated 
> [-Wdeprecated-declarations]
>
> Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
> ---
>  tests/qtest/npcm7xx_adc-test.c | 5 +++--
>  tests/qtest/npcm7xx_pwm-test.c | 8 ++++----
>  2 files changed, 7 insertions(+), 6 deletions(-)

g_strdup_printf() would be the preferred upgrade here for
all of these, I think. That gets rid of the fixed-sized
buffers entirely.

thanks
-- PMM

Reply via email to