Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6038387yba; Thu, 11 Apr 2019 10:42:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjhsm53gVuJG+zo2DcylwoBQbx0XORycZvBy4ojfJT2WRksK3/SL84B/9i8SmY3cz+M3qH X-Received: by 2002:a17:902:9043:: with SMTP id w3mr51977476plz.101.1555004539727; Thu, 11 Apr 2019 10:42:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555004539; cv=none; d=google.com; s=arc-20160816; b=wtdZDG8IdUjnxcWjc1dRH1Sm2UJwcWI4yRLYtXxyFfToOKlF+tbXotqZf9hCXT1d7q /CYm1iQGirgi4iOVLD+4FCqqSDAj6TZF9TAVMR1kpsuFz/KtY9Ns40DgvuLkGcOud1UO tfwDaK/qfbsnznC9HaU6IHqaZspWa+mCVEU8b2Q4cyEkqgKd3+UcCFBphpF2mQZu37ot FQ42F3pnTJiIcKrju4pw0FTKcPis7Tm8gVHygvc8yCP4Zmn+jKnjatr9aStnWMc0sswv ccgHTNEhXa2o2SwSd6g2zUqYogvwS5yDSMAyh7TBKI0Ae/JkATu9ykeZ9QAeXJOq2XV8 j5Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=P3snWbZlbejCCmhYDZMrWqV9hDWcu3eDsUXFC9h+FXk=; b=CchCWT/D+CEm4ABGmaTq62chsD8Aex5xlEKSwpg5d3Z2BbCifLWUNWJJTX2ViKGdie g1ol8Z8mfqQ5y58asa3EoohTpWbJYTiI4ejm7O4JIKw61IEf15Pa93uzNZCnHMOu1E5S vzRncO9iHhEpJwIqJxzpmxFc/pszKvtZrZ1o8kjY5w7Y0B+AZ8PJzci44pEVjk7OqlIz n+z7GlVpSrEYJAy9OzWQKxUPen3Erub2gxAr99HJcf/wWZwwcj0uyNm2xqCIfhfinU6h W2WDnsmp/2dax0R3Xx7M4iUgSClM4sjVsv5pc1QdCsM/WTxzVbAlcb17wvpFiVreG269 k0Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=gFW00Cqt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u70si33809480pgd.455.2019.04.11.10.42.03; Thu, 11 Apr 2019 10:42:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=gFW00Cqt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726682AbfDKRlW (ORCPT + 99 others); Thu, 11 Apr 2019 13:41:22 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:33810 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726615AbfDKRlW (ORCPT ); Thu, 11 Apr 2019 13:41:22 -0400 Received: by mail-pl1-f193.google.com with SMTP id y6so3765000plt.1 for ; Thu, 11 Apr 2019 10:41:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=P3snWbZlbejCCmhYDZMrWqV9hDWcu3eDsUXFC9h+FXk=; b=gFW00CqtGnaT+LcxfRQnMLuJMWUg7a12LhRAzBAfBPl3j/fc+KQrh7/sZyWH03o5cc v5Hn8rVpJqaTVSltYhNBPAzNwtQJSRZPUG94kQxqd9RL6gUkcNhqp47z49l1zOm8ubKt AjxsxQfip45fMbHCGOReM0O+HpuhzzxlFOxJFh7W1o0Ov7NAbvZfylpw7aL+PG5d+GBx f9OINTu/OrCCJs/nLdU/vxMIYV0Tb1SeFCkDSjBLPaP/XimpDvlm1gSNmylf64zIPysm Bjb8efXtlrgvVdHtHRpCAPDrRtw8OL1QM/ROkCkkmvlX2XmTIaXTBnA0KlEi3m79jZ6F poow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=P3snWbZlbejCCmhYDZMrWqV9hDWcu3eDsUXFC9h+FXk=; b=LtMkdUFSlRsET14UUXKYGC/X/RovjrWGe/sBptUYe1QmEXnvup0XmFN9l1UwaiMqel LkQ3UZ7gaX/UuXutZ/+K2RY82H3cuEKPiAfFNnRCAjwvT+IXCfO2ROPQIHouBmtkqS5G QIxS1mMsuV9Cy9p5UxwK8Qujsg5Mvi6M0bwvZfV1xZ6AiFaZq50aOZyGPtAzWR5l6wln RR6rflFaDRhEhG7cuoPmauClXn+y8z5WWyw2IdJNr6mRhXElmVKuUZEVX2vuGK2/KVkp 7xE0GnzGl8Z6YBpFon4p5IMSwTqoq6vvznk0l5v6cuTF1HzV5bBnTgLxWmheSk454AGo UxQA== X-Gm-Message-State: APjAAAU5g3PwMZYF1WAYOE3HWLVY7IU05uzIlfzJz+JDmeSG3lLkL0a1 1ho156CCfiYiUESJg0YhpSCCLbUygVgfVaV2oTO0xQ== X-Received: by 2002:a17:902:7588:: with SMTP id j8mr14428861pll.139.1555004480694; Thu, 11 Apr 2019 10:41:20 -0700 (PDT) MIME-Version: 1.0 References: <20190410220301.2332-1-louis@kragniz.eu> In-Reply-To: From: Nick Desaulniers Date: Thu, 11 Apr 2019 10:41:09 -0700 Message-ID: Subject: Re: [PATCH] afs: use correct format characters To: Linus Torvalds Cc: Joe Perches , Louis Taylor , David Howells , linux-afs@lists.infradead.org, Linux List Kernel Mailing , clang-built-linux@googlegroups.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 11, 2019 at 9:31 AM Linus Torvalds wrote: > > On Wed, Apr 10, 2019 at 4:01 PM Joe Perches wrote: > > > > I really think this clang message should be ignored. > > Agreed. > > > It's really unnecessary as every vararg argument smaller > > than int size is already promoted to int. > > Exactly. It's a pointless warning, making for more complex code, and > making people remember esoteric printf format details that have no > reason for existing. > > The "h" and "hh" things should never be used. The only reason for them > being used if if you have an "int", but you want to print it out as a > "char" (and honestly, that is a really bad reason, you'd be better off > just using a proper cast to make the code more obvious). > > So if what you have a "char" (or unsigned char) you should always just > print it out as an "int", knowing that the compiler already did the > proper type conversion. > > Linus https://bugs.llvm.org/show_bug.cgi?id=41467 I still think -Wformat helpful for catching completely nonsensical format strings like printing a floating point type as an integral type, or not having the correct number of arguments for the number of format strings. We'll take a look to see if we can differentiate between those and these "integer widening" ones better. -- Thanks, ~Nick Desaulniers