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=MngcZ6jz; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id 76AB55A0265 for ; Mon, 18 May 2026 15:58:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779112699; 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; bh=7gPuqZ4Ko5Cq660NQQWdy7dKD19zFl9txu4IHMa/D7o=; b=MngcZ6jz9KahQU+E58E5ju5GkOIAldT2hkZC0bl4gOWCqa1oBAqcKfZ78VdZ1zr9SPTG9c kanPGLmiKFZCqhhYLtCDMmp6JOtjiP5v+7bRyAlswHlSQOKQl6BmEghAkmMInKbIjuOnZr DlbqxPZNx7hrIyMskItmtpseO81IehE= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-353-WvW33ziDNIWBv7zZTbtAHA-1; Mon, 18 May 2026 09:58:16 -0400 X-MC-Unique: WvW33ziDNIWBv7zZTbtAHA-1 X-Mimecast-MFC-AGG-ID: WvW33ziDNIWBv7zZTbtAHA_1779112693 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id F0F5E18002E8; Mon, 18 May 2026 13:58:12 +0000 (UTC) Received: from anskuma-thinkpadp1gen7.bengluru.csb (unknown [10.74.80.120]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 71ADE30001A2; Mon, 18 May 2026 13:58:08 +0000 (UTC) From: Anshu Kumari To: anskuma@redhat.com, passt-dev@passt.top, sbrivio@redhat.com Subject: [PATCH] ip: Wrap CASE macro body in braces for pre-C23 compatibility Date: Mon, 18 May 2026 19:28:06 +0530 Message-ID: <20260518135806.429955-1-anskuma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: O8V9Kx47pWzJ-6w-xwVH8AJ5cl5ysVevwQDveNSuxXI_1779112693 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: 763W6QPSTYHRJFTA3ONNEZFPI5HLYKJH X-Message-ID-Hash: 763W6QPSTYHRJFTA3ONNEZFPI5HLYKJH X-MailFrom: anskuma@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: david@gibson.dropbear.id.au, 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: From: Jeskynar 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. The fix is to surround it with {}. Link: https://bugs.passt.top/show_bug.cgi?id=201 Signed-off-by: Anshu Kumari --- ip.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) <= IPPROTO_STRLEN, \ - "Increase IPPROTO_STRLEN to contain " #s); \ - return s; + {static_assert(sizeof(s) <= IPPROTO_STRLEN, \ + "Increase IPPROTO_STRLEN to contain " #s); \ + return s;} case IPPROTO_ICMP: CASE("ICMP"); case IPPROTO_TCP: -- 2.54.0