From a617a8e2adaaac41dd1b662b6646e8392465801c Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Thu, 1 Nov 2012 23:46:39 -0400 Subject: 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. --- src/internal/stdio_impl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/internal') diff --git a/src/internal/stdio_impl.h b/src/internal/stdio_impl.h index 80646f8c..e9045f27 100644 --- a/src/internal/stdio_impl.h +++ b/src/internal/stdio_impl.h @@ -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 -- cgit v1.2.1