Partially obtained from DragonFlyBSD:
The goal of the work to remove warnings is to improve the code, not to shut up the compiler. For 'unused local variables' warnings, this means that each case must be analyzed and either unused variable is useless and must be removed, or there is a coding error which resulted in the needed calculation being ignored.
The patch silences the warnings and hides either cosmetic or serious errors. As such, it is wrong. Better leave the warning around for somebody else to do real investigation.
P.S. Probably, the only non-hackish use of the unused attribute is to mark the unused arguments of an implementation of the externally-specified interface. One of the best examples are argc/argv main()' arguments in the hosted program which does not take any cmd line args. Local vars must almost never be unused.