From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=G7hQrF4C; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id EF6905A0265 for ; Thu, 09 Jul 2026 18:49:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1783615753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VTavKpBIohC6bXlMUC2F2sUkQcAbmVyImxXwgdtN0uk=; b=G7hQrF4ChSGhuRaByY6/b7Nb/WtWITaALPXqVRbraeCvOksKjj8fKVwrdGgny14NboaKGm Y+o3CbFP3Lhls6lvz0/btRLOi57MjHgxhAq+SldTHg/pkitb6KUNmAQT83UVOPrgvBNGn7 deLi3+4o9tQWHgHDDSWlcDVO4w0Zrqk= Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-102-YnlNvBglP1eJKHnrPuXpSw-1; Thu, 09 Jul 2026 12:49:12 -0400 X-MC-Unique: YnlNvBglP1eJKHnrPuXpSw-1 X-Mimecast-MFC-AGG-ID: YnlNvBglP1eJKHnrPuXpSw_1783615752 Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-8eb8914e651so2064956d6.3 for ; Thu, 09 Jul 2026 09:49:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783615752; x=1784220552; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=VTavKpBIohC6bXlMUC2F2sUkQcAbmVyImxXwgdtN0uk=; b=Jb2Sm4hB+LkUhGn8ufTzObXKms+cSYN3e024C6fy6j0UK5EVs/hNgH+hI9kw/i0+Yz //aUYQVmEiE4+PU2N6IoIiRauVxG/4IRFjDvauQuv7wlifeSNIp9alYEI4yDGkmpPPQX k7PsmBHCM6roFU9MRUyrLizc1LIk5RcXoDqR2guQBu0wxLIrBNgBgQF7hejkI1T8KeAV ugBU9bfyjQqplYCwge1tp2Din0W+OohRXB0BDA9gtKwqFmfPIKuIcganMjPoyW3vxVFN 9lqsv6tNKviOf59bD7CUqSCXRkgfEnrq4JEaUgfrMAwpeZJVWbYoddIYdfb7dmQSnAEC OTtQ== X-Forwarded-Encrypted: i=1; AHgh+Rqt2fSN5G9jTohzPlZDUggmYezhEhB8vXZeFR9MhXcgp33TfblY4I9Y1ZijeX2Hz1jdzcKvc5rUdX4=@passt.top X-Gm-Message-State: AOJu0YyVVGRwG0ITuUMRKFtE9v7lL/EvgCWz00mWmxjEQEEpjCBGIaMy AC/N8mbwJ1lfpTajmwLGSNiUCel+UNTugtexxEy7QQT60bsNzbz5hEoXUZdtV0kLggpUbj+yAIW hfJRY6LN1ej/3hxvSDN4+UW5JAJGnV2JLYw2eSkA/OIhU5APGaIJBMg== X-Gm-Gg: AfdE7cnT/M/0DtW4MlI4Y+mz+9EppJ/Q92QLn7+xlJGhBUMh7z1v8rwlH9QIduu0wSl Q1E4EMTwdoYd4KIjYOkl1IkymZk7oU7ei+ADg9ewZCTWt+blVeo4V/TUmXHxyHF9PIry17EOlT8 qQuYCATSqiXGj//lkMj9V/PalInCgTLoyNEnuyI3kfdp8MJeSPAxb6/J9nhJGVNsn2m3YisIGrh 0DsbLLjmuqYb3myy/SzsgNGBJBLxBJt7F1cuyIw/X5TOa+Gbwuiw/kFYmtkmASTmhii2VthsFDA 8LrfhNSLP5QsWwsVzho1Ml8QWAGtimpnvd1AsuY+67zDF9YHdAsEoHYKIyU90Jvsz+NfboMGbJz Aa40VOC/tMAJBFlhSnsd27AlO6DfHwj2kOAl7kmZy8sAI45GiL1Uqp4thkOyCnlnv7Vg+gx7RaC 8kdIQ= X-Received: by 2002:ad4:5f86:0:b0:8f3:ba0f:e7cf with SMTP id 6a1803df08f44-8fec22745e9mr86999576d6.36.1783615752114; Thu, 09 Jul 2026 09:49:12 -0700 (PDT) X-Received: by 2002:ad4:5f86:0:b0:8f3:ba0f:e7cf with SMTP id 6a1803df08f44-8fec22745e9mr86999256d6.36.1783615751586; Thu, 09 Jul 2026 09:49:11 -0700 (PDT) Received: from [192.168.2.15] (lnsm6-montreal02-142-122-43-198.internet.virginmobile.ca. [142.122.43.198]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-900a7f8f5d6sm7176066d6.15.2026.07.09.09.49.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 09 Jul 2026 09:49:11 -0700 (PDT) Message-ID: Date: Thu, 9 Jul 2026 12:49:10 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 6/7] doc/platform-requirements: Initialise va_list before va_start() To: David Gibson References: <20260708223203.885345-1-jmaloy@redhat.com> <20260708223203.885345-7-jmaloy@redhat.com> From: Jon Maloy In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: C6wNSEFpHIpDb11dQRM6f2qLGxTBVnDorlIlFcs1pUw_1783615752 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID-Hash: UPFOCROU4TM7A3WOIQOA6GZVEPOHRZIJ X-Message-ID-Hash: UPFOCROU4TM7A3WOIQOA6GZVEPOHRZIJ X-MailFrom: jmaloy@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: sbrivio@redhat.com, passt-dev@passt.top X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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? /jon > >> >> 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 >> >