From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202606 header.b=XKM6gb9Z; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 752545A0623 for ; Thu, 09 Jul 2026 04:42:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202606; t=1783564947; bh=8zpWZqcqHha3qeq6wwxWc5WM4AV2JQiu3AoAUe09v+0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XKM6gb9ZfAuS5mNP2zinSQKy8tewuyUO+CH6HTZYZDK7Lsyz++9n/A+ba9V98THyW GmOEjhAOE2t0Yp3QlcUnLo/PHN3AehV9eXrIcIs/7TdsYSWx0zVk8zu1F1mLcuWfgZ 8YjLmmtEreYOEo3b1ekiMo9/wjIek7HHEa6UQ0w1ji1p/loH44OGJPlve7U1vfUYAn G+mj85c/z88x3LUmnxfGp3tCc6v+W5iySG0RfJRABnO54/audwq7ue4qJK9eAQ6HYe UeS8VDz/NoXuBSZ+j57brRm+gt6mgTTosiN9692f2wC4VfwE9XypPDnLRi0MdmaKVa z1dIINFdGQv3Q== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4gwfPv0YHxz4xHF; Thu, 09 Jul 2026 12:42:27 +1000 (AEST) Date: Thu, 9 Jul 2026 12:40:19 +1000 From: David Gibson To: Jon Maloy Subject: Re: [PATCH 6/7] doc/platform-requirements: Initialise va_list before va_start() Message-ID: References: <20260708223203.885345-1-jmaloy@redhat.com> <20260708223203.885345-7-jmaloy@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="832hSgl/82WIfhoq" Content-Disposition: inline In-Reply-To: <20260708223203.885345-7-jmaloy@redhat.com> Message-ID-Hash: ANPIHUWTN55LA7W6IFEQNJTHGNDLJ6V4 X-Message-ID-Hash: ANPIHUWTN55LA7W6IFEQNJTHGNDLJ6V4 X-MailFrom: dgibson@gandalf.ozlabs.org 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: --832hSgl/82WIfhoq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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? >=20 > Signed-off-by: Jon Maloy > --- > doc/platform-requirements/common.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/doc/platform-requirements/common.h b/doc/platform-requiremen= ts/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 =3D { 0 }; > =20 > va_start(ap, fmt); > (void)vfprintf(stderr, fmt, ap); > --=20 > 2.52.0 >=20 --=20 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 --832hSgl/82WIfhoq Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmpPChIACgkQzQJF27ox 2GeNow/+MzNsMPc3q3bnPOEXAhYmMM+4Nh/KUT22iyUhYBBlVq2VHA1HkjqUCbWr JS1w7Tp4qvRRUFGU3BIOH9SOIxZhIKUP67hzDLuZ8dH8GsqQ1CVny5u6n4bM//qk x8dOEAldJ4sAEMCR063Lly5/6ex74iVjBW2VUPglvPgfwJO6B9CJjvdBaBxPfynW jiFZ1J8UkxeFDfSEFHDIOamyB9MA3FqVHwB3+1ANV54Ro+MEMVqgPDtSnuCmqaVf sRQm/LmP/uB40CPbez9LoMJxFR3aHqouD+Jvj7EyEaVfWV/JVxLUZ0z+6jNFVDFq 3kqPmyOtdCDUZtRzu8sgb5emAdoQfdZJkumbw4nJpG29m+iMk8cQMfAlaViHtokv UsyNtZDhrj+eVAPXqBIDCemo008kx1cWGpWkpC+OJmj5R0GvYhtNph8jUpZy0JKz CUj+GFS9mCZDheGYa/RxPyH8mDxwvIBgn/qEdXcBawqFyLzeBe/9R2IhkOAPEGFU csgovCudxZhjT4f2/v6si/846a9W0Z2Jlse31cojbtiFY48zlcErUXlFeBRwl5gK tLVEEmfbt4t3eYdhWoS1Uo+LB399Z1siqQi8anwfESRne8OL/HG7RYyFv9lZ9D/V qfhN7NhTzOtzA1b1NkKjBAp2JHMTXLSwox1n9S6wp/6Hf50nyso= =FfBL -----END PGP SIGNATURE----- --832hSgl/82WIfhoq--