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=202502 header.b=OuSA5fpT; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 68A365A0272 for ; Fri, 07 Feb 2025 02:24:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202502; t=1738891470; bh=nWHVVNSV4dqNXI1HuymxzBDBGcNlPIrzCzP8FQ70G6g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OuSA5fpTf+xFV+SmYqRwqAxpuyvgSy0LT+BwzGE7h2GvcyjxoNnPpWIJtf6J0aFnU igFrZIaDlE/eROOMgXYidkdtcc64QTHPUXHJ167tqsER+Bq+PV8q7eP2c+mU+6XYcQ L3YGOuXHf7zHy7Hs/ns4UgJtMtMWVycqQYSlTTLLqIX14LoSJ5EM/Eh5CqERHFRIkl Ba23rIp0Gd4ios4NXZXpzSRBMbamMKde8JNoS5LTdxyj5HbXDF7vR6E0noQlD/WpCp svjbUoTaCfkz5mUXTT4WvD4VQ2Ptbb6mJBXF+9Pn4xsjSx7D0wCZD8Lkzl6q+hUC8i TKyqmU7TVm2RQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Ypx8Z4xpGz4wcl; Fri, 7 Feb 2025 12:24:30 +1100 (AEDT) Date: Fri, 7 Feb 2025 12:18:00 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH] passt-repair: Dodge "structurally unreachable code" warning from Coverity Message-ID: References: <20250207010117.3119617-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tSOeyYW79Pxcwr3U" Content-Disposition: inline In-Reply-To: <20250207010117.3119617-1-sbrivio@redhat.com> Message-ID-Hash: 6CZ7FUOVH4O5PBQIEIXB73SKWIN5VAKA X-Message-ID-Hash: 6CZ7FUOVH4O5PBQIEIXB73SKWIN5VAKA 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: passt-dev@passt.top, Paul Holzinger 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: --tSOeyYW79Pxcwr3U Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Feb 07, 2025 at 02:01:17AM +0100, Stefano Brivio wrote: > While main() conventionally returns int, and we need a return at the > end of the function to avoid compiler warnings, turning that return > into _exit() to avoid exit handlers triggers a Coverity warning. It's > unreachable code anyway, so switch that single occurence back to a > plain return. >=20 > Signed-off-by: Stefano Brivio Gross that we need these workaround hacks, but Reviewed-by: David Gibson > --- > passt-repair.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/passt-repair.c b/passt-repair.c > index 5ad5c9c..322066a 100644 > --- a/passt-repair.c > +++ b/passt-repair.c > @@ -173,5 +173,5 @@ loop: > =20 > goto loop; > =20 > - _exit(0); > + return 0; > } --=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 --tSOeyYW79Pxcwr3U Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmelX0cACgkQzQJF27ox 2GcjYw//RYfBbhM0jB4QiEqfTbp1v0OCQ1G4lzbnJMG/MvpmDK1vGm/rUZITg3w+ mdwN8qqh94CUF/fNm8s9Gv/C9/y68eFlXyveUQ5xt7fp0sM5AsGit+UE0w8qUYha a8d4oPKysgxHLr8kexTNL1TitsIRXEIRmj7czvo0NFZFcJU+PscZrmiPYxvX5g8V mbKMZROptnPiQeUG1N2QdYr3ZruLPzWtPsbN4p6096TF9QyHAiouf/gZrbJJScJv UoF0EAfU/274z2A+nPLM7v+Z7uXqbeirtjpLNtWTbIGI7C+K56gibX7DI1Ge12UX pWG+PcdadJj3fLheEY0SwJs6pjbCG3GrmnpU+79+qX+CRYPmDNX7WFvrb1vqVcbV NftTE3uYwnIWp1b+M8n74RCrtzSK/FYHH2FCxNksIcMBb1h4s9toJ2Sll/GhcQO1 205nU7ZZojaBfSn1yDOiS1/XVIW/hf66ODg6InrP4zs9pUu+Hg6Od48zwoV9XyW0 RHzpIoKCccQc1C6B7mxtS29OfekCeE+AClRKk7ooYbarR8eIgjNLpzAFmiVhW+o2 KINfWoOtIlO6Dl078UpcjlEKjKb5COvBHn6k0VG+WVLTozt+pDMylGpZk4F+wOFf vGhG80aKmXdAexf/ksoQWbMArVeU0d7s1iuFIpYSVVn0rHqKRek= =vo7D -----END PGP SIGNATURE----- --tSOeyYW79Pxcwr3U--