> > #> [olheureu@WKS13 gnss 339] $ splint +boundswrite +boundsread ../tst5.c
> > #> Splint 18.104.22.168 --- 27 Mar 2002
> > #>
> > #> tst5.c: (in function main)
> > #> tst5.c:12:36: Right operand of >> may be negative (int): 19 >> n
> > #> The right operand to a shift operator may be negative (behavior undefined).
> > #> (Use -shiftnegative to inhibit warning)
> > #>
> > #> Finished checking --- 1 code warning
> > Do somebody has a clue to let Splint report the first
> > warning, and not the second?
One way to eliminate this warning would be to declare n as unsigned int.
Splint isn't doing enough numerical analysis here to know that it is