Re: Clang warning fixes for 4.4 and 4.9

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 03, 2018 at 05:46:34AM -0700, Nathan Chancellor wrote:
> On Tue, Apr 03, 2018 at 12:28:26PM +0200, Greg Kroah-Hartman wrote:
> > On Sun, Apr 01, 2018 at 03:44:46AM -0700, Nathan Chancellor wrote:
> > > db0a6fb5d97a ("audit: add tty field to LOGIN event")
> > 
> > This feels like a new feature, not a clang build warning fix, right?
> > Why is it needed?
> > 
> > thanks,
> > 
> > greg k-h
> 
> It very well might but it does fix the following Clang warning:
> 
> ../kernel/audit.c:1894:59: warning: address of array
> 'tsk->signal->tty->name' will always evaluate to 'true'
> [-Wpointer-bool-conversion]
>         if (tsk->signal && tsk->signal->tty && tsk->signal->tty->name)
>                                             ~~ ~~~~~~~~~~~~~~~~~~^~~~
> 1 warning generated.
> 
> I guess a 4.4 only fix would be to remove the '&& tsk->signal->tty->name'
> but I know you have said many times that just taking the patch in
> Linus' tree is preferred.

In looking at this closer, it does fix an audit problem in 4.4 for
correctly handling things, and it's really tiny, so I've now queued it
up, thanks.

greg k-h



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]