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=202602 header.b=Lgf8UnIR; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id B80FA5A0265 for ; Tue, 19 May 2026 03:57:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202602; t=1779155847; bh=8Eou9oIntkEEA7ILyoxf7p8XcuiIrWqr4p3XCZi8ICM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Lgf8UnIRdcxNYoGwRCbIQ0LkEBk5Hc6oKpb/5TkVyYsOIo3lxf/qmjhtXReIRruU2 8W51FVBR8m362NWjEfR3VVVgBbn4+0AumZ8f1RqA359/LzXPLlaF/6yrM4RTI1zDts tJKMxmsqCtKQOmsCgTUlv4FArhTwUQhiV72A7B3zc/WUez6p0Onvachhxg95Jgg3Yf LQZ2MPLfpggQEvZ1FeQmiImlzIqMtozd3OIm2nCeqeia1lwy5LPwVgH5Kpo8LH5wPZ s76d2iEPhQXrYuSzHBWZOI2alZvAZxSBk7mY0mzlpBZ8zmMPxy45bZ12Tq5ReDmeTW 5TXIWaUuAHQ4Q== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4gKHqW573kz58dh; Tue, 19 May 2026 11:57:27 +1000 (AEST) Date: Tue, 19 May 2026 11:57:21 +1000 From: David Gibson To: Anshu Kumari Subject: Re: [PATCH] ip: Wrap CASE macro body in braces for pre-C23 compatibility Message-ID: References: <20260518135806.429955-1-anskuma@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="fLhky5hivjPEkA5y" Content-Disposition: inline In-Reply-To: <20260518135806.429955-1-anskuma@redhat.com> Message-ID-Hash: HRLGUSIJIC3POFPEMYTZUU5L3KYS2EDU X-Message-ID-Hash: HRLGUSIJIC3POFPEMYTZUU5L3KYS2EDU 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, sbrivio@redhat.com, jmaloy@redhat.com, lvivier@redhat.com, Jeskynar 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: --fLhky5hivjPEkA5y Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, May 18, 2026 at 07:28:06PM +0530, Anshu Kumari wrote: > From: Jeskynar >=20 > Compiling on RHEL8 (gcc-8.5) gives an error in ip.c. > ip.c:88:3: error: a label can only be part of a statement and > a declaration is not a statement due to the use of static_assert. >=20 > The fix is to surround it with {}. >=20 > Link: https://bugs.passt.top/show_bug.cgi?id=3D201 > Signed-off-by: Anshu Kumari Reviewed-by: David Gibson > --- > ip.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) >=20 > diff --git a/ip.c b/ip.c > index f2506bb..7b674e0 100644 > --- a/ip.c > +++ b/ip.c > @@ -35,9 +35,9 @@ const char *ipproto_name(uint8_t proto) > { > switch (proto) { > #define CASE(s) \ > - static_assert(sizeof(s) <=3D IPPROTO_STRLEN, \ > - "Increase IPPROTO_STRLEN to contain " #s); \ > - return s; > + {static_assert(sizeof(s) <=3D IPPROTO_STRLEN, \ > + "Increase IPPROTO_STRLEN to contain " #s); \ > + return s;} > case IPPROTO_ICMP: > CASE("ICMP"); > case IPPROTO_TCP: > --=20 > 2.54.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 --fLhky5hivjPEkA5y Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmoLw3kACgkQzQJF27ox 2GfxlA/+Icx7zolgrv3u0YnrH2gYBwB/96BdRSo7Q9dOcGuy0KphoxjGm+L/AJyw 99WpDOk73SwMbN0j+EOr53VV44yNwBMjCt+QjmqlPJEtKAfd3ti9nBZ3nlWAIPAm jbyXB+ZJWjV8Bw6WAphffot/jQtzfuy0N0IdhaVno8mwQSg9BC7cH0GZ59AIEwVh ix9W10LDBZhrYSRQjoSJMuKAOMMmIVKzG4Sb0VTTFU5aGeFNbpIcKTJBx05m5vZR ocYtE8cwKQPnCqYN2wNnczR4wOOJ35QHLsh2nd/qVyZYXskWPBqUevSA2URmIe27 XoAzJbXs1HwZqpIMdB1MGB7sJSIqE3z8C+XiiUZvo9VULR2CPKSlCsux42eOcnZn OYga+yC3mpSENUs8P0dLCp38iR8d0QKYVe6ZNcuBUUJ3xfZHbbT/GoEBVxs+LcaY qiy6UZz4XlL/KZAzUoHlUxg/dZuKNQ03Gisrf5oKlcyZAeLet+dGEmic4/C6eawC RY9Ozx9JS0uy6ICvPBwywtSuO4hIYQdpZNSJowrTf+BT9ksvNK8/nuWXYcOhCwBG pq2uDjCutZXZ3ju3hH2j47HsI/S/WThW4FpIBtx1TWAKfvFwqZUZjw4ufG7v3IoD PJXZSXQyE+MoktrNgS27oa3H+2YgJVRx9voWLg4aRH9Z7dK87mk= =bvQu -----END PGP SIGNATURE----- --fLhky5hivjPEkA5y--