lkml.org 
[lkml]   [2022]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] mediatek: mt7601u: fix clang -Wformat warning
From
Date
On Fri, 2022-07-15 at 17:08 -0700, Justin Stitt wrote:
> On Thu, Jul 14, 2022 at 11:33 PM Joe Perches <joe@perches.com> wrote:
> >
> > On Mon, 2022-07-11 at 14:29 -0700, Justin Stitt wrote:
> > > When building with Clang we encounter this warning:
> > > > drivers/net/wireless/mediatek/mt7601u/debugfs.c:92:6: error: format
> > > > specifies type 'unsigned char' but the argument has type 'int'
> > > > [-Werror,-Wformat] dev->ee->reg.start + dev->ee->reg.num - 1);
[]
> > I suggest s/%hh/%/ for all the uses here, not just this one.
>
> I also contemplated this change but I think it might be a bit out of
> scope for https://github.com/ClangBuiltLinux/linux/issues/378 -- What
> do you think?

It would not be out of scope.

> It could be argued that every single instance of %hh[dux] should be
> replaced with %[dux].

All the vsprintf ones, but not the scanf ones.

\
 
 \ /
  Last update: 2022-07-16 03:42    [W:0.067 / U:1.944 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site