diff options
author | Rich Felker <dalias@aerifal.cx> | 2012-11-01 23:46:39 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2012-11-01 23:46:39 -0400 |
commit | a617a8e2adaaac41dd1b662b6646e8392465801c (patch) | |
tree | f5adaf552d944be658e4f967c3f55cc2987fe12f /src/stdio | |
parent | 3a5aa8e49ce9a98725ceb311bb64f6168fc72d3e (diff) | |
download | musl-a617a8e2adaaac41dd1b662b6646e8392465801c.tar.gz musl-a617a8e2adaaac41dd1b662b6646e8392465801c.tar.bz2 musl-a617a8e2adaaac41dd1b662b6646e8392465801c.tar.xz musl-a617a8e2adaaac41dd1b662b6646e8392465801c.zip |
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.
Diffstat (limited to 'src/stdio')
-rw-r--r-- | src/stdio/__stdio_exit.c | 2 | ||||
-rw-r--r-- | src/stdio/fclose.c | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/stdio/__stdio_exit.c b/src/stdio/__stdio_exit.c index 3f87e7ed..0fb33234 100644 --- a/src/stdio/__stdio_exit.c +++ b/src/stdio/__stdio_exit.c @@ -8,7 +8,7 @@ weak_alias(dummy_file, __stderr_used); static void close_file(FILE *f) { if (!f) return; - FLOCK(f); + FFINALLOCK(f); if (f->wpos > f->wbase) f->write(f, 0, 0); if (f->rpos < f->rend) f->seek(f, f->rpos-f->rend, SEEK_CUR); } diff --git a/src/stdio/fclose.c b/src/stdio/fclose.c index 92bf7ff8..38e8a1e3 100644 --- a/src/stdio/fclose.c +++ b/src/stdio/fclose.c @@ -5,8 +5,7 @@ int fclose(FILE *f) int r; int perm; - /* This lock is not paired with any unlock. */ - FLOCK(f); + FFINALLOCK(f); if (!(perm = f->flags & F_PERM)) { OFLLOCK(); |