Kill -Wunused-but-set warnings
Subsystems (2)
David Miller
maintainercover Kill -Wunused-but-set warnings
The weather is real nice, so I decided to lock myself inside and fix compiler warnings.
I started using gcc-4.6.x on my primary sparc64 build test machine the other week and it now enables -Wunused-but-set with -Wall and it does catch a bunch of bogus stuff.
Most of the cases are where you'd expect them, ISDN and ATM.
This is the first pass I've made over the networking cases.
There's still a bunch more to do.
Quoted 6 lines · David Miller
The weather is real nice, so I decided to lock myself inside and fix compiler warnings.
I started using gcc-4.6.x on my primary sparc64 build test machine the other week and it now enables -Wunused-but-set with -Wall and it does catch a bunch of bogus stuff.
[...]
In most of these cases there is presumably no need for the variable at all. In others, the variable should have been used - which I believe is the main reason for the warning - and by removing it you will be hiding a bug.
Ben.
Signature · 3 lines
Ben Hutchings, Senior Software Engineer, Solarflare Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked.
David Miller
maintainerFrom: Ben Hutchings <[email protected]>
Date: Mon, 18 Apr 2011 03:19:15 +0100
Quoted 4 lines
In most of these cases there is presumably no need for the variable at all. In others, the variable should have been used - which I believe is the main reason for the warning - and by removing it you will be hiding a bug.
If you look at about 5 or 6 of my patches, that's exactly what I did, make use of the variable.
Otherwise I tossed it.
It seems I messed up the decnet case, which I'll fix shortly.