From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by dcvr.yhbt.net (Postfix) with ESMTP id AECD91F54E for ; Wed, 31 Aug 2022 15:12:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231557AbiHaPMS (ORCPT ); Wed, 31 Aug 2022 11:12:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229529AbiHaPMR (ORCPT ); Wed, 31 Aug 2022 11:12:17 -0400 Received: from cloud.peff.net (cloud.peff.net [104.130.231.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08E49D3ECF for ; Wed, 31 Aug 2022 08:12:15 -0700 (PDT) Received: (qmail 14901 invoked by uid 109); 31 Aug 2022 15:12:15 -0000 Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Wed, 31 Aug 2022 15:12:15 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 14300 invoked by uid 111); 31 Aug 2022 15:12:15 -0000 Received: from coredump.intra.peff.net (HELO sigill.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Wed, 31 Aug 2022 11:12:15 -0400 Authentication-Results: peff.net; auth=none Date: Wed, 31 Aug 2022 11:12:14 -0400 From: Jeff King To: =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason Cc: Junio C Hamano , Derrick Stolee , Derrick Stolee via GitGitGadget , git@vger.kernel.org Subject: Re: [PATCH] ci: update 'static-analysis' to Ubuntu 22.04 Message-ID: References: <7364f631-e05b-0db8-aaa4-9f0101b6db56@github.com> <220825.86ilmg4mil.gmgdl@evledraar.gmail.com> <220829.86k06r2v6z.gmgdl@evledraar.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <220829.86k06r2v6z.gmgdl@evledraar.gmail.com> Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Mon, Aug 29, 2022 at 12:29:09PM +0200, Ævar Arnfjörð Bjarmason wrote: > My reading of this is that you're misimpression that unused.cocci and > Jeff's UNUSED macro are two ways to the same end-goal, and that if we > keep the macro we could lose the coccinelle rule. Ah, I didn't think of that, but yeah, that would explain Junio's position a bit more. > But they're doing completely orthogonal checks, the unused.cocci is > finding code that's *actually used* accordingn to the compiler, but which > we know results in code that's functionally unused. Right. They're two separate types of "unused", and they should actually complement each other (e.g., if we drop an unused strbuf parameter, then a calling function may find that it is now doing nothing but init/release on the strbuf). So we'd want both. -Peff