On 11/4/24 13:30, Peter Maydell wrote:
On Thu, 11 Apr 2024 at 11:47, Philippe Mathieu-Daudé <phi...@linaro.org> wrote:
sprintf() is deprecated on Darwin since macOS 13.0 / XCode 14.1,
resulting in painful developper experience. Use snprintf() instead.
("developer")
Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
---
hw/net/rocker/rocker.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
switch (offset) {
case ROCKER_DMA_DESC_ADDR_OFFSET:
- sprintf(buf, "Ring[%s] ADDR", ring_name);
+ snprintf(buf, sizeofbuf), "Ring[%s] ADDR", ring_name);
Something seems to have gone wrong here. Shouldn't this have
failed to compile ?
This code is guarded by DEBUG_ROCKER, which is why I didn't noticed :)
Indeed when enabling:
../../hw/net/rocker/rocker.c:930:65: error: extraneous ')' before ';'
snprintf(buf, sizeofbuf), "Ring[%s] ADDR", ring_name);
^