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:
parent
3a5aa8e49c
commit
a617a8e2ad
4 changed files with 5 additions and 6 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue