Re: staging/dgap/dgap.c:981: bad if test ?

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

 



On Thu, Jan 22, 2015 at 10:20:44AM +0000, David Binderman wrote:
> I used the static analyser cppcheck to find these two bugs, but
> you might be able to find similar problems by using gcc compiler
> flag -Wlogical-op.

I turned it on, but GCC 4.7.2 doesn't find anything for me.

It complains about:
	if (x != 1 || x != 2)

but it doesn't complain about:
	if (x == 0 || x != 1 || x != 2) 

Smatch is similar to GCC in this regard...

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux