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=ISm1yo8H; 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 17BA25A0262 for ; Wed, 20 May 2026 02:37:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779237472; 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=hXOmvJOm6H5QMun9JoN160DB4lIfYBZpsX3xz221o6M=; b=ISm1yo8HYHeytMYqQIgDd/LA9SARfb9hijCUEZehHJ8meINP4tnYEKnjFcchedHIILYCyD /Fkc7fenoZJwb21nnJquI0jbQi0vGcAAlyRHM4eMiYdHTfM+uzZ8PVVr0enYVH/Zbe+y66 toh5wLviDWAY0gYYS4WW3SNp7os6G0A= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-552-KtpIWVjvPJquZ43HN5ohGA-1; Tue, 19 May 2026 20:37:50 -0400 X-MC-Unique: KtpIWVjvPJquZ43HN5ohGA-1 X-Mimecast-MFC-AGG-ID: KtpIWVjvPJquZ43HN5ohGA_1779237469 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-48fd3dbd16aso34406375e9.0 for ; Tue, 19 May 2026 17:37:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779237469; x=1779842269; h=date:content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hXOmvJOm6H5QMun9JoN160DB4lIfYBZpsX3xz221o6M=; b=iN44iZ7LTJn6aa4UJKx74CXlZSZa8NDoZy0BPyKOlnGphSU/k20qaDTnbS1mIfqQkE FmaYvb9rQVmGjHQG9bdgBGeO3aSU6kos/Ura4XjsM5zK4dJ+6FFnsm/ar71HD8VKaqQL VmYeLicxvgN3GJrH63OMBsGtaFKbwEYNVRATAnvECdUDEsULEHhSJNw2cxVGuXZ+C4Vb /Fg7k0TRVy72hIiZYh8I9TiLX0t9mOVrMVDubfXZNC3Anfp7I5VEANGz6ASbPpvgfzAd KVMzg2CrBfewSFygSYn12BbaSpL2+y1nFlxcArkgv0PiX03KOGEMOmDwtmLgmTOO7v+I N84Q== X-Gm-Message-State: AOJu0Yy1meemT8H1rbImbV2/w77BNwStEVXXypHq3GepKGptWBLVLP/r 4/pK9ImPiytnpyUEsrZ0n6tSdMWb3dSyd+zzXKaXfWari+HBkMlY3uBKqKMrngx4OcCHwDVFR7X Yns32r2nIRXF6bwJ9vrwwwGDDtoL3otlkqRtpZSQC/f/avd8PG6W1Dg== X-Gm-Gg: Acq92OEwPSbXTxRhAuDB3ZG6WB5fR49OTGQVxRbUF9/eoYxxqyUc+tzVSFAMaVoPkCL eGfyLUwgJJr/4OAqfH3hSz6kAOK7pOrR0Mh2uFaUaWBTxukYxdmDdtBFHvzqGy48n6+fIOad5xE 6h/LxsPxcQ9cftg3S2G5HHSUzOTzUxwqvosvToii28lmCDhahwd/OFhSelrpokWTYLS5/O5I8Vg Q7VWfBIrm5SqUo/q/JW3nWBq93cPltWDfRVhqXgpW3V6TQiUen5HQNjYF56EEACV8aL42TWK5Ey 6Ku2liJemmBTHQq4ow6HcpbWlEt0jWrA6husA7Id2GEI7NJyTTCKvCWcT9VVvMfBIyxvFeHODHN WGPbFFD3cCicbBcknq/rNOTOJRLOKh02dXZgIcXoGBlK03++Yfw== X-Received: by 2002:a05:600d:8496:10b0:48f:eb8b:997e with SMTP id 5b1f17b1804b1-48feb8b9ab1mr209962455e9.26.1779237469418; Tue, 19 May 2026 17:37:49 -0700 (PDT) X-Received: by 2002:a05:600d:8496:10b0:48f:eb8b:997e with SMTP id 5b1f17b1804b1-48feb8b9ab1mr209962345e9.26.1779237468954; Tue, 19 May 2026 17:37:48 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48fe4c834besm387272625e9.3.2026.05.19.17.37.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2026 17:37:48 -0700 (PDT) From: Stefano Brivio To: Anshu Kumari Subject: Re: [PATCH] ip: Wrap CASE macro body in braces for pre-C23 compatibility Message-ID: <20260520023747.7817e648@elisabeth> In-Reply-To: <20260518135806.429955-1-anskuma@redhat.com> References: <20260518135806.429955-1-anskuma@redhat.com> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 Date: Wed, 20 May 2026 02:37:48 +0200 (CEST) X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 28cPtJ7gm7cxVMhpdP8N8tHWhU-QVGwzcBA33sexfq8_1779237469 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: ARZYZTFFIT7K3F5SNPWUWCFUD2MHNKPZ X-Message-ID-Hash: ARZYZTFFIT7K3F5SNPWUWCFUD2MHNKPZ X-MailFrom: sbrivio@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: passt-dev@passt.top, 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: On Mon, 18 May 2026 19:28:06 +0530 Anshu Kumari wrote: > 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;} One minor detail, which I would usually fix up on merge, but in this case it's half of the patch...: our coding style always has code blocks separated by newlines and indented, that is, in this case: { static_assert(sizeof(s) <= IPPROTO_STRLEN, \ "Increase IPPROTO_STRLEN to contain " \ #s); \ return s; } and in these cases I would suggest to add (perhaps I mentioned it already?) something like "Based on a patch from ..." blah. Then before your Signed-off-by you can describe shortly what you changed in square brackets. Just grep for "Based on" in the git log, you'll find plenty of (rather consistent) examples. -- Stefano