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=FWCBergr; 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 631485A0265 for ; Tue, 26 May 2026 14:45:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779799511; 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=noxdRKIngGTSVDAkg0SCwXtZI1BK4dxhjnsY6gWjxqA=; b=FWCBergrIZakAIf8giGRdOcxNt53DuYCUETG2vFA+kKRop3TapKFzdAWRKvoUFsJPZHGMj DyyorI65aWlcscTPzQZbUf1m0O7hhmGuyVUl0ZLDAzQgK0EJqtYvcEnNHc+K6bQMf72uko p7Lqb+WacTV4moiQHXAgJgbhb5vmcnI= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-299-W630K_W7OBudWe0sygv-nQ-1; Tue, 26 May 2026 08:45:06 -0400 X-MC-Unique: W630K_W7OBudWe0sygv-nQ-1 X-Mimecast-MFC-AGG-ID: W630K_W7OBudWe0sygv-nQ_1779799505 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-44a3aee3813so4734664f8f.3 for ; Tue, 26 May 2026 05:45:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779799505; x=1780404305; 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=noxdRKIngGTSVDAkg0SCwXtZI1BK4dxhjnsY6gWjxqA=; b=VOW3N5oL57+ametGr8kNX7gLX4H6cUrTkbfr0Q1AVCzDcgTwxPWeY7TAyJyRGSF8qx MOx+KmkRNgjyETZ8Qse5ckuSsRm3dwFlQ+Mf+wBPnCcpxP3juTiPpCjm0w7C/1zyG4Zm ngW229nB9Bv0TH/TmrqvJrepph0EQOdOOSyuXyVqrkN8b0m44B9GpNP6PIGrwRrCAJpD f4Tk5TO3Ezz3dxuz6hZ6THN3vdtuH8VBRr+LRSuRVA0RoA/ehNoqoPndx7a2wsRvhoub U0LgL/DoHsY1Q32PCVJXs6ywxOBIV6O4P7PmVSGMzl7BPgwIZXcfATaa4s+oO1fdCP9F SEfQ== X-Gm-Message-State: AOJu0Yyl43vo05HT3uXFvtxDxGxQ4NddNRgnqsrcZeuSgoKA5maClZUl Ws9yup00b/GMc3Z/yPmBQ3Oj6sZ3iqhgDglwebpkrCMv9SUPeiLPdS6eEJPNJQv/3NFSUaZQfJl K841IX/VNgRVmLQ1iC6kW7iPnURC/Da5YSxzKCEG2T9K+2+Xq0xhZfA== X-Gm-Gg: Acq92OFrP0Jo/qjaJHtvFFkKinujvQa6XUrQ+5OFhVACt0mCj4RduSjKmGucJHK3RG5 dNNxm8itvMd+Y0r4d8HV+NFFeIBGU9tdrni4t1n8SeCs9k5viYrRg1v5SAyLkQINNxciru2LcCJ OQNuKm1JC5m8XyYZMmCs1Lx24ZqMBFMwO+xNhadUbn/giL85t/PASek7Tay1UGZ5YbfY3UAI4FT XYNNwqDaFa7fC6VrRkLz9fc32aJub1ldvleWmo0y4Aa/0LTTSssXt6Fxfs/lbu/bVYOS5b+oSSM SXrTnAQqF48XQuRTvb50yETDSasz0KzQTpQo8COVxzrXTemQat6V4TMuUA5ydd88wbu1xA5n/Mw wxNjUy+BZtwmOPfoWZ6tnCYvLWbDVK6uv X-Received: by 2002:a05:6000:4a09:b0:43d:762e:76c6 with SMTP id ffacd0b85a97d-45eb38a7f6fmr32292604f8f.7.1779799504997; Tue, 26 May 2026 05:45:04 -0700 (PDT) X-Received: by 2002:a05:6000:4a09:b0:43d:762e:76c6 with SMTP id ffacd0b85a97d-45eb38a7f6fmr32292526f8f.7.1779799504480; Tue, 26 May 2026 05:45:04 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [2a10:fc81:a806:d6a9::1]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45eb6d493dfsm36083766f8f.23.2026.05.26.05.45.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 May 2026 05:45:03 -0700 (PDT) From: Stefano Brivio To: Anshu Kumari Subject: Re: [PATCH] ip: Wrap CASE macro body in braces for pre-C23 compatibility Message-ID: <20260526144502.648e3b39@elisabeth> In-Reply-To: <20260520023747.7817e648@elisabeth> References: <20260518135806.429955-1-anskuma@redhat.com> <20260520023747.7817e648@elisabeth> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 Date: Tue, 26 May 2026 14:45:03 +0200 (CEST) X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: aU3jxTLwMV9l5C5ee6IYoul2xy-y2n7UkXEpDsNPFZE_1779799505 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: XSNK2GYVUE24FVL4ZJLNLBMP634JE53V X-Message-ID-Hash: XSNK2GYVUE24FVL4ZJLNLBMP634JE53V 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 Wed, 20 May 2026 02:37:47 +0200 Stefano Brivio wrote: > 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. I went ahead and fixed the coding style myself while applying this. As we just fixed all known regressions from 2026_05_07.1afd4ed, I'm about to tag a release now, and it would be nice to have this fix in. -- Stefano