Re: script to find incorrect tests on unsigneds

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

 



ok I tested it and these are in fact correct:

* i == -C
* i != -C

Also correct when someone fears that 'i' may become signed in the future:
* i <= 0
* i >= 0

But the latter, does not make sense when used as a test in a for or while
loop. Also an else branch indicates a signed assumption.

So the spatch could contain for the basic matches:

(
* i < 0
|
* i < -C
|
* i > -C
|
* i <= -C
|
* i >= -C
)
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux