diff options
author | Werner Koch <wk@gnupg.org> | 2014-03-07 09:46:44 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2014-03-07 19:05:41 +0100 |
commit | 4387ecb11cdb2addf738eb922c1b9f14c6c76efc (patch) | |
tree | 401d2885fa584262d3fe3b0a2daed4c23a24d95f /dirmngr/cdblib.c | |
parent | dirmngr: Simplify strtok macro. (diff) | |
download | gnupg2-4387ecb11cdb2addf738eb922c1b9f14c6c76efc.tar.xz gnupg2-4387ecb11cdb2addf738eb922c1b9f14c6c76efc.zip |
Silence more warnings about unused vars and args.
* dirmngr/cdblib.c (cdb_init) [W32]: Remove unused var.
* dirmngr/dirmngr-client.c (start_dirmngr): s/int/assuan_fd_t/.
* dirmngr/dirmngr.c (w32_service_control): Mark unused args.
(call_real_main): New.
(main) [W32]: Use new function to match prototype.
(real_main) [W32]: Mark unused vars.
(handle_signal) [W32]: Do not build the function at all.
(handle_connections) [W32]: Do not define signo.
* dirmngr/ldap-wrapper-ce.c (outstream_reader_cb): Remove used vars.
* g10/tdbio.c (ftruncate) [DOSISH]: Define only if not yet defined.
Diffstat (limited to 'dirmngr/cdblib.c')
-rw-r--r-- | dirmngr/cdblib.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/dirmngr/cdblib.c b/dirmngr/cdblib.c index 9ab4d3c24..9636b6ce5 100644 --- a/dirmngr/cdblib.c +++ b/dirmngr/cdblib.c @@ -115,9 +115,10 @@ cdb_init(struct cdb *cdbp, int fd) { struct stat st; unsigned char *mem; - unsigned fsize; #ifdef _WIN32 HANDLE hFile, hMapping; +#else + unsigned int fsize; #endif /* get file size */ @@ -128,7 +129,6 @@ cdb_init(struct cdb *cdbp, int fd) gpg_err_set_errno (EPROTO); return -1; } - fsize = (unsigned)(st.st_size & 0xffffffffu); /* memory-map file */ #ifdef _WIN32 # ifdef __MINGW32CE__ @@ -145,11 +145,12 @@ cdb_init(struct cdb *cdbp, int fd) if (!mem) return -1; cdbp->cdb_mapping = hMapping; -#else +#else /*!_WIN32*/ + fsize = (unsigned int)(st.st_size & 0xffffffffu); mem = (unsigned char*)mmap(NULL, fsize, PROT_READ, MAP_SHARED, fd, 0); if (mem == MAP_FAILED) return -1; -#endif /* _WIN32 */ +#endif /*!_WIN32*/ cdbp->cdb_fd = fd; cdbp->cdb_fsize = st.st_size; |