From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202606 header.b=XHN0HVTx; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id B11EB5A0271 for ; Mon, 15 Jun 2026 10:18:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202606; t=1781511516; bh=JJdM/nIvTMj1nl8tps+wNgl67rfuDU4w9SU2FQhqjgo=; h=From:To:Cc:Subject:Date:From; b=XHN0HVTxgE0765+rvq4tK+qseLj5Gbpfdw105XfsxKsoT8WVvPdLUIXwmz57EBqN3 nWgcvMPhAHjbpRpIlbXaxENAroVVBPG0vFS+T9YSV6EvXkpjuHWMc8kF9Emqk+QXO4 Pz71fXl0h88/7ApcWqWQ7NGgXwDqzrAzcxmbuWgSfAcxiU6YVy4AHYt38WPOjz9pga UdCGgivgA67adu807ywIvUTnSQQ5JBVTD++z7TpFD74ZYtDdULl4O7FsGJqATpBCc4 442ndaJ5geB16zS/roqAYBnTBjQ8n/In1cjOU1Bu1KaOEscBjUwSf7y4jNV6TejcuF H6kSlsA+ctZ2w== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4gf30r17gMz4wTT; Mon, 15 Jun 2026 18:18:36 +1000 (AEST) From: David Gibson To: Stefano Brivio , passt-dev@passt.top Subject: [PATCH 0/5] Fix cppcheck-2.21.0 warnings Date: Mon, 15 Jun 2026 18:18:28 +1000 Message-ID: <20260615081833.1061725-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.54.0 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: G7577HKJZXRDE6SBKFVGYYAHX72D73SW X-Message-ID-Hash: G7577HKJZXRDE6SBKFVGYYAHX72D73SW X-MailFrom: dgibson@gandalf.ozlabs.org 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 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: Another cppcheck version, another batch of false positives :(. These appears to be cppcheck regressions, I've filed two bugs on their tracker. Still, here are workarounds in the passt code. At least I managed to make a few genuine if minor improvements to the code along the way. David Gibson (5): cppcheck: Remove unused CPPCHECK_6936 cppcheck: Add workaround for cppcheck bug 14847 tcp: Merge common sequence logic from tcp_{buf,vu}_data_from_sock() tcp: Avoid SEQ_*() comparisons against 0 tcp: MAX_WINDOW should be unsigned Makefile | 3 +-- tcp.c | 50 +++++++++++++++++++++++++++++++++++--------------- tcp_buf.c | 28 ++++------------------------ tcp_buf.h | 3 ++- tcp_internal.h | 4 ++-- tcp_vu.c | 27 ++++----------------------- tcp_vu.h | 3 ++- util.c | 6 ++++-- 8 files changed, 54 insertions(+), 70 deletions(-) -- 2.54.0