diff options
author | Werner Koch <[email protected]> | 2015-11-27 16:53:52 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2015-11-27 17:32:26 +0000 |
commit | 022342e2845834ec35269d23491e9fa573d5c028 (patch) | |
tree | 0331f4867ac25b55a1ba350adef194d84abd008c /common/iobuf.c | |
parent | Avoid incompatible pointer assignment warnings on Windows. (diff) | |
download | gnupg-022342e2845834ec35269d23491e9fa573d5c028.tar.gz gnupg-022342e2845834ec35269d23491e9fa573d5c028.zip |
Silence unused variable or parameter warnings.
--
Diffstat (limited to '')
-rw-r--r-- | common/iobuf.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/common/iobuf.c b/common/iobuf.c index d49de9695..e8b4a034e 100644 --- a/common/iobuf.c +++ b/common/iobuf.c @@ -267,6 +267,7 @@ direct_open (const char *fname, const char *mode, int mode700) unsigned long da, cd, sm; HANDLE hfile; + (void)mode700; /* Note, that we do not handle all mode combinations */ /* According to the ReactOS source it seems that open() of the @@ -2271,8 +2272,6 @@ iobuf_set_limit (iobuf_t a, off_t nlimit) off_t iobuf_get_filelength (iobuf_t a, int *overflow) { - struct stat st; - if (overflow) *overflow = 0; @@ -2330,11 +2329,15 @@ iobuf_get_filelength (iobuf_t a, int *overflow) } log_error ("GetFileSize for handle %p failed: %s\n", fp, w32_strerror (0)); -#else - if ( !fstat (FD2INT (fp), &st) ) - return st.st_size; - log_error("fstat() failed: %s\n", strerror(errno) ); -#endif +#else /*!HAVE_W32_SYSTEM*/ + { + struct stat st; + + if ( !fstat (FD2INT (fp), &st) ) + return st.st_size; + log_error("fstat() failed: %s\n", strerror(errno) ); + } +#endif /*!HAVE_W32_SYSTEM*/ } return 0; |