From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id A90945A0050 for ; Thu, 06 Jun 2024 12:10:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1717668601; bh=+DwugzM4Av01hfprgqTc5Uq/VQXqnEVRv81VT8qSpvI=; h=From:To:Cc:Subject:Date:From; b=Ksei84f7qhV1LSGftnpo+a05bJNHMBqTtLT3NubEM42CxVZW+lT7hnhwr2dToJpGr 245GX7XoBayh9SSE9C6O79TfPzil9GUHU28lesTy7pHBszt3VpStgae+hyIKzOWYiF hzDoGkCCaQeaIdYdKwZKWH7Z4Bq9lK5hB6NbqTYTtsybKPJhbQTMbsVMoC/LEYYcFr pEzLrhyHo02dXc+6ISZqELBQfuunJPa3QixjeKfMxquYOZHj8kUmqOpkLYqNplp8Hq +OErOJUlvb7Puh0ecfbYOMz/BYqiUaUlN6f6S0X2Ymu/3lWFELED+fZUPxqvbfAYXo LMWlufT4d8+8w== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Vw0ST2xcdz4wc3; Thu, 6 Jun 2024 20:10:01 +1000 (AEST) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH 0/9] Some more static checker fixes Date: Thu, 6 Jun 2024 20:09:40 +1000 Message-ID: <20240606100949.1250958-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.45.2 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: ROYD5OLJDDHVIWGOV5OTYI66UWRZKYJF X-Message-ID-Hash: ROYD5OLJDDHVIWGOV5OTYI66UWRZKYJF 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: This series includes a number of fixes related to the static checkers: * Fedora 40 has updated to Cppcheck 2.14.1 which introduces some new warnings. Fix them. * Jon's recent patch caused a small cppcheck regression. I assume neither Jon nor Stefano is using sufficiently recent cppcheck versions to catch it. Fix that too. * We were disabling the bugprone-macro parentheses check in clang-tidy. I don't think that's a good idea. Re-enable it and fix existing warnings. * It might also be a good idea to enable the bugprone-narrowing-conversions check. Fix a number of issues across the tree which, amongst other things trigger that warning. There are lots of other places that trigger the warning which I haven't fixed yet, so don't enable it yet. David Gibson (9): tcp: Make pointer const in tcp_revert_seq udp: Make rport calculation more local cppcheck: Suppress constParameterCallback errors Remove pointless macro parameters in CALL_PROTO_HANDLER clang-tidy: Enable the bugprone-macro-parentheses check util: Use unsigned indices for bits in bitmaps conf: Safer parsing of MAC addresses lineread: Use ssize_t for line lengths util: Use 'long' to represent millisecond durations Makefile | 3 +-- conf.c | 55 +++++++++++++++++++++++++++++++++++----------------- lineread.c | 10 ++++------ lineread.h | 7 ++++--- passt.c | 6 +++--- tap.c | 37 ++++++++++++++++++----------------- tcp.c | 10 +++++----- tcp_splice.c | 4 ++-- udp.c | 3 +-- util.c | 10 +++++----- util.h | 8 ++++---- 11 files changed, 85 insertions(+), 68 deletions(-) -- 2.45.2