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 6C9FE5A026F for ; Fri, 29 Sep 2023 17:31:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696001501; 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=Qg5+zbHkHV55uywzyHJxIfIlTIEgYNOz611D4bxJQ4s=; b=FBY5zMvX1o+PaSWRocSTl+k5KxHCaD8cHvQeJZeZYyUd91yCatEdxOdqIVjVddgnFYPDzv 3bRJQHck4p1X8N8c3lIp3fPgEFvuFWnmJoSPmQUMWsC5TW1/icqzBZN7h4OS0kgikEbP3n +3D/PVWM8IucYDqsDdcvH0/dQILiVSs= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-633-lTeLSJZjMi69ullCOuTNFA-1; Fri, 29 Sep 2023 11:31:37 -0400 X-MC-Unique: lTeLSJZjMi69ullCOuTNFA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (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 93C5B85A5BA; Fri, 29 Sep 2023 15:31:37 +0000 (UTC) Received: from elisabeth (unknown [10.39.208.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ACC97492B16; Fri, 29 Sep 2023 15:31:36 +0000 (UTC) Date: Fri, 29 Sep 2023 17:31:34 +0200 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH 0/4] RFC: Updates for cppcheck-2.12 warnings Message-ID: <20230929173134.4f7c1947@elisabeth> In-Reply-To: <20230929055022.48624-1-david@gibson.dropbear.id.au> References: <20230929055022.48624-1-david@gibson.dropbear.id.au> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: FEYJ4DXYL7SDIDR2HGG7DZEXLCTXQLYB X-Message-ID-Hash: FEYJ4DXYL7SDIDR2HGG7DZEXLCTXQLYB 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 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. > 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. -- Stefano