qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 05/12] system/qtest: Replace sprintf() by g_string_append_pri


From: Thomas Huth
Subject: Re: [PATCH 05/12] system/qtest: Replace sprintf() by g_string_append_printf()
Date: Thu, 11 Apr 2024 08:30:27 +0200
User-agent: Mozilla Thunderbird

On 10/04/2024 18.06, Philippe Mathieu-Daudé wrote:
sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1,
resulting in painful developper experience.

Replace sprintf() by GString API uses in order to avoid:

   [120/169] Compiling C object libcommon.fa.p/system_qtest.c.o
   system/qtest.c:623:13: warning: 'sprintf' is deprecated:
     This function is provided for compatibility reasons only.
     Due to security concerns inherent in the design of sprintf(3),
     it is highly recommended that you use snprintf(3) instead.
     [-Wdeprecated-declarations]
             sprintf(&enc[i * 2], "%02x", data[i]);
             ^
   1 warning generated.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
  system/qtest.c | 8 +++-----
  1 file changed, 3 insertions(+), 5 deletions(-)

Reviewed-by: Thomas Huth <thuth@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]