|
From: | Eric Blake |
Subject: | Re: [PATCH-for-5.1?] qapi/error: Check format string argument in error_propagate_prepend() |
Date: | Thu, 23 Jul 2020 08:19:08 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 7/23/20 5:04 AM, Philippe Mathieu-Daudé wrote:
error_vprepend is one more candidate for GCC_FMT_ATTR. Maybe you can add that, too.This one is different as it uses a va_list. Now I realize it is only called in util/error.c, and all its callers are guarded with GCC_FMT_ATTR. Maybe we can make it static to simplify... Markus?
Using GCC_FMT_ATTR on va_list functions is just fine; the difference is that you spell its parameters (n, 0) instead of (n, n + 1). As for marking the function static, that was just discussed and rejected:
https://lists.gnu.org/archive/html/qemu-devel/2020-07/msg06730.html -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3226 Virtualization: qemu.org | libvirt.org
[Prev in Thread] | Current Thread | [Next in Thread] |