From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTP id E23155A026F for ; Thu, 5 Oct 2023 08:19:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696486757; 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=+DSacLXfaO2j63NpYaIGxN0+SogaFpCMf9bD7Zga0ao=; b=Ju3AfX7x4RQ2UlpF38OJiCUmxnps8YcDWvCc7lFp02IeKLcNVmlnQAde/iWU1CPL/I+ijF DZiBQuon3vblBe6WywbIoW/2/54clUiNQbzAGJEQW+5Ub3xJfWpi1HjxV+thtpfSRX9/DM Q4m3iSwAENoaUUTIRTNnFDr4gCpfI0c= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-113-lZau-SJIPB2Ks7jP9-8N1g-1; Thu, 05 Oct 2023 02:19:14 -0400 X-MC-Unique: lZau-SJIPB2Ks7jP9-8N1g-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0E5892823816; Thu, 5 Oct 2023 06:19:14 +0000 (UTC) Received: from elisabeth (unknown [10.39.208.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3527B440E3; Thu, 5 Oct 2023 06:19:13 +0000 (UTC) Date: Thu, 5 Oct 2023 08:19:10 +0200 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH 0/4] RFC: Updates for cppcheck-2.12 warnings Message-ID: <20231005081910.1243a6e3@elisabeth> In-Reply-To: References: <20230929055022.48624-1-david@gibson.dropbear.id.au> <20230929173134.4f7c1947@elisabeth> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: HOY4BOKGKEL2ZB5NIEZ3EWUNSJW7KUY3 X-Message-ID-Hash: HOY4BOKGKEL2ZB5NIEZ3EWUNSJW7KUY3 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 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 Tue, 3 Oct 2023 13:36:12 +1100 David Gibson wrote: > On Fri, Sep 29, 2023 at 05:31:34PM +0200, Stefano Brivio wrote: > > On Fri, 29 Sep 2023 15:50:18 +1000 > > David Gibson wrote: > > > > > cppcheck 2.12 (which Fedora 38 has updated, for one) introduces a > > > number of new warnings. Unfortunately, at least one of these is a > > > clear bug in cppcheck. > > > > > > This series fixes a number of the new warnings reported in passt > > > (patches 1..3) and works around the remaining cppcheck bug (patch 4). > > > I'm pretty confident that patches 1 & 2 are safe and beneficial to > > > apply regardless of which cppcheck we're using. > > > > > > Patch 3 is a little more dubious, because it potentially increases the > > > cppcheck runtime. On my system it doesn't seem to make a significant > > > difference, but that might not always stay true. > > > > On my system, it's 23 seconds instead of 21... I don't really see a > > problem with that. > > Right, it's like 16s vs 15s for me. I was just a bit concerned they > might add more, very expensive tests under the "exhaustive" set later > on. > > > > Patch 4 is a tricky one. It applies a specific suppression to work > > > around the cppcheck bug. That's necessary to get a pass with the > > > currently available cppcheck. However, it's ugly and we'd like to > > > remove it once the bug is fixed, but have no obvious way to remind us > > > to do that. What we want to do here kind of depends how long it takes > > > the bug to be fixed, which isn't clear at the moment. > > > > I don't see a big issue with this either, we already have one > > suppression like that in tcp_clamp_window() where we kind of identified > > the issue but it hasn't been solved yet. > > > > Once it's fixed, we'll hopefully notice and drop the suppression if > > cppcheck 2.12 is old enough by then, but if we don't, I don't think it's > > a drama. > > > > The whole series looks good to me by the way. > > Ok. Well, apply whenever you're ready then, I guess. Sure, applied now. -- Stefano