On Thu, 9 Jul 2026 12:49:10 -0400
Jon Maloy
On 2026-07-08 22:40, David Gibson wrote:
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?
TBH I dislike it too. I still decided to post it just to see the feedback. I cannot see any other way to get rid of this warning, but maybe somebody else has?
I don't think we need to get rid of any warnings here as we don't run static checkers on the code in platform-requirements/ anyway, it's just there as documentation, proof of concept, or test code. -- Stefano