Partially obtained from DragonFlyBSD:
http://gitweb.dragonflybsd.org/dragonfly.git/commit/cf515c3a6f3a8964ad592e524442bc628f8ed63b
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Passed - Unit
No Test Coverage
Event Timeline
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.
Got the point! I'm gonna keep this review request until I can verify case by case and submit in different review requests to finish these changes specified here.
Thanks.
lib/libc/stdio/vfwscanf.c | ||
---|---|---|
269 | This one for example looks like it came from a similar structure as convert_wccl above and should be deleted; perhaps convert_wccl should also drop wcp0 and use n++. |