qemu-ppc
[Top][All Lists]
Advanced

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

Re: [PATCH v2 03/13] hw/ppc/spapr: Replace sprintf() by snprintf()


From: Richard Henderson
Subject: Re: [PATCH v2 03/13] hw/ppc/spapr: Replace sprintf() by snprintf()
Date: Thu, 11 Apr 2024 12:47:02 -0700
User-agent: Mozilla Thunderbird

On 4/11/24 03:15, Philippe Mathieu-Daudé wrote:
sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1,
resulting in painful developper experience.

Replace sprintf() by snprintf() in order to avoid:

   hw/ppc/spapr.c:385:5: 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(mem_name, "memory@%" HWADDR_PRIx, start);
       ^
   1 warning generated.

Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
---
  hw/ppc/spapr.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

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