From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id F1A045A026F for ; Thu, 21 Sep 2023 06:49:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1695271783; bh=uCAmwOdLSKT8qigI3rzbq90psZsV+WRhOW36VFsyATU=; h=From:To:Cc:Subject:Date:From; b=WSvRLRwbRlsKal2wzP/AtAbk3QY10YlAo2VKs3ZWeNpwW4Qh5JZUF87yVUBurNmE4 l4fkuZMVGbOlz+VzYRFSSawMuojvlOB7vymlkzaT925tURtz9pV6epd6H/OrvkLVNQ miY9Up4hvWMzEHHYetQeDIFsnaKgUT282qhf3elE= Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4RrjcR1WkQz4x5K; Thu, 21 Sep 2023 14:49:43 +1000 (AEST) From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: [PATCH v2 0/2] Some static checker fixes Date: Thu, 21 Sep 2023 14:49:37 +1000 Message-ID: <20230921044939.1752225-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.41.0 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: TEK7XWM2GVOMCJHZZMMRFQ54DXPE76RF X-Message-ID-Hash: TEK7XWM2GVOMCJHZZMMRFQ54DXPE76RF 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: We already had a couple of places we were working around clang-tidy issue 58992, and the flow table series adds more. I got sick of ugly inlines every time we used a syscall which returns a socket address, so wrote a patch to consolidate the workarounds in one place. However, that patch added an include of to util.h which exposed a classic C library gotcha in packet.c, so I fixed that too. Changes since v1: * Updated missed comment to match code changes in 1/2 * Fixed more places which shadowed index(3) David Gibson (2): Avoid shadowing index(3) util: Consolidate and improve workarounds for clang-tidy issue 58992 Makefile | 2 +- icmp.c | 5 ----- packet.c | 30 +++++++++++++++--------------- packet.h | 10 +++++----- tcp.c | 22 ++++++++-------------- tcp_splice.c | 2 +- util.c | 12 ++++++------ util.h | 43 ++++++++++++++++++++++++++++++++++++++++++- 8 files changed, 78 insertions(+), 48 deletions(-) -- 2.41.0