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:11:15 +0100 |
commit | 094aa2589e3920d400be93ae2823a6c4b23db623 (patch) | |
tree | 9e00935c719c1625eeb10b2da6e03b24801d25d1 /scd | |
parent | w32: Fix a potential problem in gpgconf's gettext. (diff) | |
download | gnupg2-094aa2589e3920d400be93ae2823a6c4b23db623.tar.xz gnupg2-094aa2589e3920d400be93ae2823a6c4b23db623.zip |
w32: Silence warnings about unused vars.
* agent/gpg-agent.c (main) [W32]: Mark unused vars.
* sm/gpgsm.c (run_protect_tool) [W32]: Ditto.
* g10/trustdb.c (check_regexp) [DISABLE_REGEX]: Ditto.
* scd/scdaemon.c (main) [W32]: Ditto.
(handle_connections) [W32]: Ditto.
(handle_signal) [W32]: Do not build the function at all.
* scd/apdu.c (pcsc_send_apdu_direct): Ditto.
(connect_pcsc_card): s/long/pcsc_dword_t/.
(open_pcsc_reader_direct): Remove var listlen.
Diffstat (limited to 'scd')
-rw-r--r-- | scd/apdu.c | 9 | ||||
-rw-r--r-- | scd/scdaemon.c | 13 |
2 files changed, 14 insertions, 8 deletions
diff --git a/scd/apdu.c b/scd/apdu.c index ffc727c42..fc37fcffe 100644 --- a/scd/apdu.c +++ b/scd/apdu.c @@ -1081,6 +1081,8 @@ pcsc_send_apdu_direct (int slot, unsigned char *apdu, size_t apdulen, struct pcsc_io_request_s send_pci; pcsc_dword_t recv_len; + (void)pininfo; + if (!reader_table[slot].atrlen && (err = reset_pcsc_reader (slot))) return err; @@ -1513,7 +1515,7 @@ connect_pcsc_card (int slot) { char reader[250]; pcsc_dword_t readerlen, atrlen; - long card_state, card_protocol; + pcsc_dword_t card_state, card_protocol; pcsc_vendor_specific_init (slot); @@ -1525,7 +1527,7 @@ connect_pcsc_card (int slot) reader_table[slot].atr, &atrlen); if (err) log_error ("pcsc_status failed: %s (0x%lx) %lu\n", - pcsc_error_string (err), err, readerlen); + pcsc_error_string (err), err, (long unsigned int)readerlen); else { if (atrlen > DIM (reader_table[0].atr)) @@ -1853,7 +1855,7 @@ open_pcsc_reader_direct (const char *portstr) long err; int slot; char *list = NULL; - pcsc_dword_t nreader, listlen; + pcsc_dword_t nreader; char *p; slot = new_reader_slot (); @@ -1897,7 +1899,6 @@ open_pcsc_reader_direct (const char *portstr) return -1; } - listlen = nreader; p = list; while (nreader) { diff --git a/scd/scdaemon.c b/scd/scdaemon.c index 982c52fec..6fe11f83a 100644 --- a/scd/scdaemon.c +++ b/scd/scdaemon.c @@ -806,7 +806,10 @@ main (int argc, char **argv ) fflush (NULL); -#ifndef HAVE_W32_SYSTEM +#ifdef HAVE_W32_SYSTEM + (void)csh_style; + (void)nodetach; +#else pid = fork (); if (pid == (pid_t)-1) { @@ -958,12 +961,12 @@ scd_get_socket_name () } +#ifndef HAVE_W32_SYSTEM static void handle_signal (int signo) { switch (signo) { -#ifndef HAVE_W32_SYSTEM case SIGHUP: log_info ("SIGHUP received - " "re-reading configuration and resetting cards\n"); @@ -1004,12 +1007,12 @@ handle_signal (int signo) cleanup (); scd_exit (0); break; -#endif /*!HAVE_W32_SYSTEM*/ default: log_info ("signal %d received - no action defined\n", signo); } } +#endif /*!HAVE_W32_SYSTEM*/ static void @@ -1182,7 +1185,6 @@ static void handle_connections (int listen_fd) { npth_attr_t tattr; - int signo; struct sockaddr_un paddr; socklen_t plen; fd_set fdset, read_fdset; @@ -1193,6 +1195,9 @@ handle_connections (int listen_fd) struct timespec curtime; struct timespec timeout; int saved_errno; +#ifndef HAVE_W32_SYSTEM + int signo; +#endif ret = npth_attr_init(&tattr); /* FIXME: Check error. */ |