On Wed, Jul 08, 2026 at 06:32:02PM -0400, Jon Maloy wrote: > va_start() initialises the va_list, but zero-initialise it at > declaration as well to make it clear the variable is not used > uninitialised. I really dislike this approach to suppressing uninitialised variable warnings. A decent tool should be able to tell that va_start() initialises ap, and pre-initialising means that tool will no longer warning if we accidentally deleted the va_start(). Is there really no other way for the warning in question? > > Signed-off-by: Jon Maloy > --- > doc/platform-requirements/common.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/doc/platform-requirements/common.h b/doc/platform-requirements/common.h > index e85fc2b5..815e8271 100644 > --- a/doc/platform-requirements/common.h > +++ b/doc/platform-requirements/common.h > @@ -18,7 +18,7 @@ > __attribute__((format(printf, 1, 2), noreturn)) > static inline void die(const char *fmt, ...) > { > - va_list ap; > + va_list ap = { 0 }; > > va_start(ap, fmt); > (void)vfprintf(stderr, fmt, ap); > -- > 2.52.0 > -- David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson