64-bit: some compilation warnings (gcc 4.8.1, Cygwin64)
Vasiliy
testtest_2005 at ukr.net
Fri Jun 28 21:20:53 CEST 2013
typos (apdu.c, pcsc-wrapper.c): unsinged -> unsigned
also:
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/scd/apdu.c:
In function ‘pcsc_send_apdu_direct’:
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/scd/apdu.c:1046:35:
warning: unused parameter ‘pininfo’ [-Wunused-parameter]
pininfo_t *pininfo)
^
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/scd/apdu.c:
In function ‘connect_pcsc_card’:
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/scd/apdu.c:1491:26:
warning: passing argument 4 of ‘pcsc_status’ from incompatible pointer
type [enabled by default]
reader_table[slot].atr, &atrlen);
^
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/scd/apdu.c:1491:26:
note: expected ‘pcsc_dword_t *’ but argument is of type ‘long int *’
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/scd/apdu.c:1491:26:
warning: passing argument 5 of ‘pcsc_status’ from incompatible pointer
type [enabled by default]
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/scd/apdu.c:1491:26:
note: expected ‘pcsc_dword_t *’ but argument is of type ‘long int *’
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/scd/apdu.c:1494:20:
warning: format ‘%lu’ expects argument of type ‘long unsigned int’,
but argument 4 has type ‘pcsc_dword_t’ [-Wformat=]
pcsc_error_string (err), err, readerlen);
^
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/scd/apdu.c:
In function ‘open_pcsc_reader_direct’:
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/scd/apdu.c:1681:25:
warning: variable ‘listlen’ set but not used
[-Wunused-but-set-variable]
pcsc_dword_t nreader, listlen;
^
...
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/scd/app-nks.c:
In function ‘do_change_pin’:
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/scd/app-nks.c:1250:9:
warning: ‘pwid’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
err = iso7816_change_reference_data (app->slot, pwid,
^
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/scd/app-nks.c:
In function ‘do_check_pin’:
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/scd/app-nks.c:1279:3:
warning: ‘pwid’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
return verify_pin (app, pwid, desc, pincb, pincb_arg);
^
...
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/g13/mount.c:
In function ‘g13_mount_container’:
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/g13/mount.c:161:10:
warning: ‘headerlen’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
msglen = headerlen - 32;
^
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/g13/mount.c:142:10:
note: ‘headerlen’ was declared here
size_t headerlen, msglen;
^
...
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/dirmngr/dirmngr.c:
In function ‘pid_suffix_callback’:
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/dirmngr/dirmngr.c:542:3:
warning: passing argument 1 of ‘pthread_getspecific’ makes pointer
from integer without a cast [enabled by default]
value.aptr = npth_getspecific (my_tlskey_current_fd);
^
In file included from /usr/include/npth.h:61:0,
from
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/dirmngr/dirmngr.c:43:
/usr/include/pthread.h:145:7: note: expected ‘pthread_key_t’ but
argument is of type ‘int’
void *pthread_getspecific (pthread_key_t);
^
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/dirmngr/dirmngr.c:
In function ‘main’:
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/dirmngr/dirmngr.c:651:3:
warning: passing argument 1 of ‘pthread_key_create’ from incompatible
pointer type [enabled by default]
if (npth_key_create (&my_tlskey_current_fd, NULL) == 0)
^
In file included from /usr/include/npth.h:61:0,
from
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/dirmngr/dirmngr.c:43:
/usr/include/pthread.h:147:5: note: expected ‘struct __pthread_key_t
**’ but argument is of type ‘int *’
int pthread_key_create (pthread_key_t *, void (*)(void *));
^
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/dirmngr/dirmngr.c:652:5:
warning: passing argument 1 of ‘pthread_setspecific’ makes pointer
from integer without a cast [enabled by default]
if (npth_setspecific (my_tlskey_current_fd, NULL) == 0)
^
In file included from /usr/include/npth.h:61:0,
from
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/dirmngr/dirmngr.c:43:
/usr/include/pthread.h:202:5: note: expected ‘pthread_key_t’ but
argument is of type ‘int’
int pthread_setspecific (pthread_key_t, const void *);
^
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/dirmngr/dirmngr.c:
In function ‘start_connection_thread’:
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/dirmngr/dirmngr.c:1714:3:
warning: passing argument 1 of ‘pthread_setspecific’ makes pointer
from integer without a cast [enabled by default]
npth_setspecific (my_tlskey_current_fd, argval.aptr);
^
In file included from /usr/include/npth.h:61:0,
from
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/dirmngr/dirmngr.c:43:
/usr/include/pthread.h:202:5: note: expected ‘pthread_key_t’ but
argument is of type ‘int’
int pthread_setspecific (pthread_key_t, const void *);
^
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/dirmngr/dirmngr.c:1729:3:
warning: passing argument 1 of ‘pthread_setspecific’ makes pointer
from integer without a cast [enabled by default]
npth_setspecific (my_tlskey_current_fd, argval.aptr);
^
In file included from /usr/include/npth.h:61:0,
from
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/dirmngr/dirmngr.c:43:
/usr/include/pthread.h:202:5: note: expected ‘pthread_key_t’ but
argument is of type ‘int’
int pthread_setspecific (pthread_key_t, const void *);
^
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/tools/gpgkey2ssh.c:
In function ‘main’:
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/tools/gpgkey2ssh.c:148:11:
warning: ‘fields[3]’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
err = gcry_mpi_scan (&mpi, GCRYMPI_FMT_HEX, fields[3], 0, NULL);
^
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/tools/gpgkey2ssh.c:85:13:
note: ‘fields[3]’ was declared here
char *fields[6];
^
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/tools/gpgkey2ssh.c:141:9:
warning: ‘fields[1]’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
i = atoi (fields[1]);
^
/usr/src/64bit/release/gnupg/gnupg-2.1.0beta4-1/src/gnupg-2.1.0beta4/tools/gpgkey2ssh.c:85:13:
note: ‘fields[1]’ was declared here
char *fields[6];
^
More information about the Gcrypt-devel
mailing list