fix more unused variable warnings

some of these were coming from stdio functions locking files without
unlocking them. I believe it's useful for this to throw a warning, so
I added a new macro that's self-documenting that the file will never
be unlocked to avoid the warning in the few places where it's wrong.
This commit is contained in:
Rich Felker 2012-11-01 23:46:39 -04:00
commit a617a8e2ad
4 changed files with 5 additions and 6 deletions

View file

@ -24,6 +24,7 @@
#define UNGET 8
#define FFINALLOCK(f) ((f)->lock>=0 ? __lockfile((f)) : 0)
#define FLOCK(f) int __need_unlock = ((f)->lock>=0 ? __lockfile((f)) : 0)
#define FUNLOCK(f) if (__need_unlock) __unlockfile((f)); else