On 7/30/21 1:15 PM, James Carlson wrote:
On 7/30/21 4:48 AM, Dan Carpenter wrote:
--> 2840 ppp->nextseq = PPP_MP_CB(tail)->sequence + 1;
Here is where Smatch complains.
If that's Smatch's analysis of the situation, then Smatch is wrong.
It's a bogus warning.
For what it's worth, it's not my code, and I agree that it's at least a
bit hard to follow, and may well harbor bugs. If you're suggesting
either some kind of suppression directive (I tried looking for some
Smatch documentation but couldn't find much to suggest that's possible,
though I guess now that you'd be the one who knows for sure), or adding
something like "u32 nextseq = PPP_CB(tail)->sequence + 1;" around line
2795, and then using "ppp->nextseq = nextseq;" on 2840, then I'd be in
favor of that, at least to make the tool happy.
Is there an equivalent of "/* LINTED: tail pointer still ok */" here?
James Carlson 42.703N 71.076W <carlsonj@xxxxxxxxxxxxxxx>