From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=fail (p=quarantine dis=none) header.from=redhat.com 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 4824F5A0271 for ; Sun, 25 Oct 2026 18:22:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1792948966; 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=lSPmT0moaWJwnYzlKDFsaiA0RDDa/HEZr3v8KMlxncs=; b=gPXOqFIgQQfj/NxlgUy7J3Gl449+2LlBZtZF63fRN8M5EBSFTpEqnn+w0zlyFbT9PUg3H3 XNGr9iZrTiqPsYwOhSOswsCrwmptSFojHS+ZHHQtgDoBScUM+jO4TDxiqTvWWC0GaIZLHc +FmwFIRiYio8Z/4TPDCMm5qod093cLo= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-653-0g1I_Mk7OtyWyx3euSE03Q-1; Sun, 25 Oct 2026 13:22:44 -0400 X-MC-Unique: 0g1I_Mk7OtyWyx3euSE03Q-1 X-Mimecast-MFC-AGG-ID: 0g1I_Mk7OtyWyx3euSE03Q_1792948963 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-c40aa03ded8so236977966b.2 for ; Sun, 25 Oct 2026 10:22:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792948963; x=1793553763; h=date:content-transfer-encoding:content-type: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:content-type; bh=lSPmT0moaWJwnYzlKDFsaiA0RDDa/HEZr3v8KMlxncs=; b=t1WUFDcJTO4bGr4E700u2LM0+UKov6dAqzW31/gcCHujJISH0YruG5qpOUd5Zpw/vG Nx6/rbKBemwpjbn32DofAEpEXEHgaCWpQMliiPFPJb16Ty4H2a1B07t3dz/eV2bFVvpW BAuRL9tynqODhoDld4Mwn2yITkd/+6avgKyZ3l+0jgS15KiSsS0xvd6oSkrjuELsjac1 SANLv+rCPJMXhopzIPURjQNxlmAyLJOQZHowbe4eHaKl1tEwQglZfQ0NqquyGvrDoTCw 9ccnIcU4s5rSbShkFVVzptFoYRZnQb0MTYhnfQjZUnunT6aLJfn0NaI1s37udqRh101F Tn4Q== X-Gm-Message-State: AFq9FYLxj/O56oMkjtYOSAhl5KiwPD8uuczmj35CqQsX+2RTcn2fM34r CpNbn1Mir0MKcXFjXd7RJDz2VW5GzL9/Gve9a7Ri/6HNnG5DyoTfLnkhZNjJTGeZaoBiXh65shv lNv8lus2rjPLd5IRJjTgoMKLwphba2Pt9f+bHoV8anso6wEGPvfq75O3gSifU+gJTUMXf7deBMm lo7cHNwNriUs+z19VLRPDf1ygsCodBcoVMW8LM X-Gm-Gg: AYBFou2m3pu7NMpFPplZ0VhiStF02MWyZcH0VTu7qkCmx1uU+HQnysrLnDLUv1XCEFX Hd9wRVHv/eJUKZ/jRKGlI4WhHYZH5n4bBk2oDCDn+QxP50QLPX2F/4EX9A5p1LKyOW544OHlMbs 3WfoRk5LP5O30yn3j2I9Hq+9dsaHOvyFGnjTJYrztxrRWe07PN8aXkojpCUcy1nwjTCtjZ0YdNl FWpeU83KisujTLhyMnqce/AgyzSisJKgjBQDdsYAOB2iS1rqzmzHTnXB7v5VlH+baZ7d8Rbmc+5 LWCLBkAGs2ODFPmvBEetpyYL3NBIBvnh8lJMzRlMudmUR+gQygIRcg2bw17K7krPIqq/CCellKD XzHC8ypK2dQ== X-Received: by 2002:a17:907:6ea5:b0:c32:3da2:69bf with SMTP id a640c23a62f3a-c46bde8a540mr601787766b.30.1792948963345; Sun, 25 Oct 2026 10:22:43 -0700 (PDT) X-Received: by 2002:a17:907:6ea5:b0:c32:3da2:69bf with SMTP id a640c23a62f3a-c46bde8a540mr601783666b.30.1792948962745; Sun, 25 Oct 2026 10:22:42 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [2a10:fc81:a806:d6a9::1]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c46bd52435asm221566166b.36.2026.10.25.10.22.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Oct 2026 10:22:42 -0700 (PDT) From: Stefano Brivio To: Laurent Vivier Subject: Re: [PATCH 0/2] cppcheck 2.22.0 fixes Message-ID: <20261025182239.0b5ac7b0@elisabeth> In-Reply-To: <20261015100741.1583455-1-lvivier@redhat.com> References: <20261015100741.1583455-1-lvivier@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: Sun, 25 Oct 2026 18:22:41 +0100 (CET) X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: TLTagos2-2MK7Ug8wP1CAb29ndvgMhjLRAonLsKNdO0_1792948963 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: 6TQ5M4GG5QBT6DGNFTXQCIX6NLBW7HZ5 X-Message-ID-Hash: 6TQ5M4GG5QBT6DGNFTXQCIX6NLBW7HZ5 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 Thu, 15 Oct 2026 12:07:39 +0200 Laurent Vivier wrote: > Two fixes for issues detected by cppcheck 2.22.0. > > The first is a real simplification: a !partial_send guard in > tcp_data_from_tap() is always true when reached, because partial_send > causes an early return above it, so the condition is dropped. > > The second is a false positive: cppcheck flags buf[n - 1] as a > potential negative index in passt-repair.c, not tracking that n < 0 > and n < sizeof(*ev) are both handled before that point. The warning > is suppressed with an annotation. > > Signed-off-by: Laurent Vivier > > Laurent Vivier (2): > tcp: Drop always-true !partial_send condition in tcp_data_from_tap() > passt-repair: Suppress false positive cppcheck negativeIndex warning Applied. I added an "unmatchedSuppression" tag to the suppression in 2/2, for compatibility with older versions of Cppcheck. -- Stefano