diff options
author | Werner Koch <wk@gnupg.org> | 2014-03-07 09:46:44 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2014-03-07 16:06:35 +0100 |
commit | 3032fc3ad78ac9ed857570844547afed520d635a (patch) | |
tree | 5aa245750d356cbdf6e7d51fb97b7c0fc8d4dc17 /agent | |
parent | w32: Include winsock2.h to silence warnings. (diff) | |
download | gnupg2-3032fc3ad78ac9ed857570844547afed520d635a.tar.xz gnupg2-3032fc3ad78ac9ed857570844547afed520d635a.zip |
Silence several warnings when building under Windows.
* agent/call-scd.c (start_scd): Replace int by assuan_fd_t.
(start_pinentry): Ditto.
* common/asshelp.c (start_new_gpg_agent): Replace int by assuan_fd_t.
* common/dotlock.c (GNUPG_MAJOR_VERSION): Include stringhelp.h for
prototypes on Windows and some other platforms.
* common/logging.c (fun_writer): Declare addrbuf only if needed.
* g10/decrypt.c (decrypt_message_fd) [W32]: Return not_implemented.
* g10/encrypt.c (encrypt_crypt) [W32]: Return error if used in server
mode.
* g10/dearmor.c (dearmor_file, enarmor_file): Replace GNUPG_INVALID_FD
by -1 as temporary hack for Windows.
* g10/export.c (do_export): Ditto.
* g10/revoke.c (gen_desig_revoke, gen_revoke): Ditto.
* g10/sign.c (sign_file, clearsign_file, sign_symencrypt_file): Ditto.
* g10/server.c (cmd_verify, gpg_server) [W32]: Return an error.
--
The gpg server mode is not actual working and thus we can avoid the
warnings by explicitly disabling the mode. We keep it working under
Unix, though.
Diffstat (limited to 'agent')
-rw-r--r-- | agent/call-pinentry.c | 4 | ||||
-rw-r--r-- | agent/call-scd.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/agent/call-pinentry.c b/agent/call-pinentry.c index 78e1c1106..2562e51f4 100644 --- a/agent/call-pinentry.c +++ b/agent/call-pinentry.c @@ -208,7 +208,7 @@ start_pinentry (ctrl_t ctrl) const char *pgmname; assuan_context_t ctx; const char *argv[5]; - int no_close_list[3]; + assuan_fd_t no_close_list[3]; int i; const char *tmpstr; unsigned long pinentry_pid; @@ -291,7 +291,7 @@ start_pinentry (ctrl_t ctrl) no_close_list[i++] = assuan_fd_from_posix_fd (log_get_fd ()); no_close_list[i++] = assuan_fd_from_posix_fd (fileno (stderr)); } - no_close_list[i] = -1; + no_close_list[i] = ASSUAN_INVALID_FD; rc = assuan_new (&ctx); if (rc) diff --git a/agent/call-scd.c b/agent/call-scd.c index a6c429c41..289b2d95a 100644 --- a/agent/call-scd.c +++ b/agent/call-scd.c @@ -198,7 +198,7 @@ start_scd (ctrl_t ctrl) const char *pgmname; assuan_context_t ctx = NULL; const char *argv[3]; - int no_close_list[3]; + assuan_fd_t no_close_list[3]; int i; int rc; @@ -324,7 +324,7 @@ start_scd (ctrl_t ctrl) no_close_list[i++] = assuan_fd_from_posix_fd (log_get_fd ()); no_close_list[i++] = assuan_fd_from_posix_fd (fileno (stderr)); } - no_close_list[i] = -1; + no_close_list[i] = ASSUAN_INVALID_FD; /* Connect to the pinentry and perform initial handshaking. Use detached flag (128) so that under W32 SCDAEMON does not show up a |