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=202410 header.b=S++SIppw; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 24A7B5A061A for ; Wed, 06 Nov 2024 00:27:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202410; t=1730849254; bh=JRY67MWr/+pCRBYUhW/yVLVu2M26/dZP1YDRaRdNnPw=; h=From:To:Cc:Subject:Date:From; b=S++SIppwyUmViBnzw7mMOtKccVuetJODmNBl94o3pXrOv9nBMgkXJg0RhePz7SxqE 2qpUsv1eygjXd9jW7czGok1QdGh26o83h2EOgqw3yLRUZzjA7sCbMJVJ9DtobaT2b2 +kf3Fjz1hG72HYFijRhUFLgrM1iLtdhIpNVZzMGmrjlF+UuZVPC4NRTEhWBN+JAflo nYZBNhR30PSe+eexLPHY0tqUGWLXguJEXBEoe+XEzW++cVjO+6On+RORXhb6gU+Q0E fFvSrnipQQSxcy/jOeUyjpCA6DYc2rnBzESZg9ovD9b9aC9qFnEGtFId9K6z2q8DB6 Er3abomZ/Ixcw== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4XjkyZ3cKTz4wcj; Wed, 6 Nov 2024 10:27:34 +1100 (AEDT) From: David Gibson To: Stefano Brivio , passt-dev@passt.top Subject: [PATCH 00/12] Minor fixups for or inspired by clangd and related tools Date: Wed, 6 Nov 2024 10:25:16 +1100 Message-ID: <20241105232528.1408144-1-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.47.0 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: GSQNFKMAGQZMZQSHIX2C24AFXPVXQGKD X-Message-ID-Hash: GSQNFKMAGQZMZQSHIX2C24AFXPVXQGKD 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: I've been experimenting with Zed and clangd recently. Currently it generates an enormous number of largely spurious errors and warnings on the passt code base. Mostly that's due to its default configurations not suiting us. This series adds some configuration that addresses a number of those warnings, though there remain many more for now. Some of the warnings also look reasonable, so I have a grab bag of fixes or workarounds for some of those two. David Gibson (12): clang: Add .clang-format file Makefile: Simplify exclusion of qrap from static checks clang: Move clang-tidy configuration from Makefile to .clang-tidy arch: Avoid explicit access to 'environ' flow: Correct type of flowside_at_sidx() netlink: RTA_PAYLOAD() returns int, not size_t Makefile: Move NETNS_RUN_DIR definition to C code seccomp: Simplify handling of AUDIT_ARCH Makefile: Use -DARCH for qrap only Makefile: Don't attempt to auto-detect stack size clang: Add rudimentary clangd configuration util: Remove unused ffsl() function .clang-format | 126 ++++++++++++++++++++++++++++++++++++++++++++++ .clang-tidy | 93 ++++++++++++++++++++++++++++++++++ .clangd | 3 ++ Makefile | 136 +++----------------------------------------------- arch.c | 2 +- conf.c | 2 + flow_table.h | 2 +- netlink.c | 4 +- seccomp.sh | 14 +++++- util.h | 5 +- 10 files changed, 247 insertions(+), 140 deletions(-) create mode 100644 .clang-format create mode 100644 .clang-tidy create mode 100644 .clangd -- 2.47.0