summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-11-12 16:56:06 +0100
committerSimon Josefsson <simon@josefsson.org>2008-11-12 16:56:06 +0100
commitc2e5b92797a49247a419d49116295433e1f9be60 (patch)
tree939657329c6b2e5992394d8dc75658d558f1ead7
parentc2af53dff7adcf5f72a0525b68948c94df7732b2 (diff)
downloadgnutls-c2e5b92797a49247a419d49116295433e1f9be60.tar.gz
Fix warnings.
-rw-r--r--lib/gnutls_buffers.c12
-rw-r--r--lib/gnutls_extensions.c2
-rw-r--r--lib/gnutls_extensions.h2
-rw-r--r--lib/gnutls_handshake.c4
-rw-r--r--lib/gnutls_mpi.c3
-rw-r--r--lib/gnutls_x509.c1
6 files changed, 11 insertions, 13 deletions
diff --git a/lib/gnutls_buffers.c b/lib/gnutls_buffers.c
index f8248b8660..b52eb83185 100644
--- a/lib/gnutls_buffers.c
+++ b/lib/gnutls_buffers.c
@@ -345,7 +345,7 @@ _gnutls_read (gnutls_session_t session, void *iptr,
int err = session->internals.errnum ? session->internals.errnum
: errno;
- _gnutls_read_log ("READ: %d returned from %d, errno=%d gerrno=%d\n",
+ _gnutls_read_log ("READ: %d returned from %p, errno=%d gerrno=%d\n",
i, fd, errno, session->internals.errnum);
if (err == EAGAIN || err == EINTR)
@@ -353,7 +353,7 @@ _gnutls_read (gnutls_session_t session, void *iptr,
if (sizeOfPtr - left > 0)
{
- _gnutls_read_log ("READ: returning %d bytes from %d\n",
+ _gnutls_read_log ("READ: returning %d bytes from %p\n",
sizeOfPtr - left, fd);
goto finish;
@@ -373,7 +373,7 @@ _gnutls_read (gnutls_session_t session, void *iptr,
else
{
- _gnutls_read_log ("READ: Got %d bytes from %d\n", i, fd);
+ _gnutls_read_log ("READ: Got %d bytes from %p\n", i, fd);
if (i == 0)
break; /* EOF */
@@ -391,7 +391,7 @@ finish:
char tmp[16];
- _gnutls_read_log ("READ: read %d bytes from %d\n",
+ _gnutls_read_log ("READ: read %d bytes from %p\n",
(sizeOfPtr - left), fd);
for (x = 0; x < ((sizeOfPtr - left) / 16) + 1; x++)
@@ -767,7 +767,7 @@ _gnutls_io_write_buffered (gnutls_session_t session,
("WRITE: Restoring old write. (%d bytes to send)\n", n);
}
- _gnutls_write_log ("WRITE: Will write %d bytes to %d.\n", n, fd);
+ _gnutls_write_log ("WRITE: Will write %d bytes to %p.\n", n, fd);
i = 0;
left = n;
@@ -846,7 +846,7 @@ _gnutls_io_write_buffered (gnutls_session_t session,
_gnutls_write_log
- ("WRITE: wrote %d bytes to %d. Left %d bytes. Total %d bytes.\n",
+ ("WRITE: wrote %d bytes to %p. Left %d bytes. Total %d bytes.\n",
i, fd, left, n);
for (x = 0; x < (unsigned) ((i) / 16) + 1; x++)
{
diff --git a/lib/gnutls_extensions.c b/lib/gnutls_extensions.c
index 0e705a178c..e4e536f47d 100644
--- a/lib/gnutls_extensions.c
+++ b/lib/gnutls_extensions.c
@@ -327,7 +327,7 @@ _gnutls_ext_init (void)
return GNUTLS_E_SUCCESS;
}
-int
+void
_gnutls_ext_deinit (void)
{
gnutls_free (extfunc);
diff --git a/lib/gnutls_extensions.h b/lib/gnutls_extensions.h
index 53bcb4175c..e049340793 100644
--- a/lib/gnutls_extensions.h
+++ b/lib/gnutls_extensions.h
@@ -28,4 +28,4 @@ int _gnutls_parse_extensions (gnutls_session_t session,
int _gnutls_gen_extensions (gnutls_session_t session, opaque * data,
size_t data_size);
int _gnutls_ext_init (void);
-int _gnutls_ext_deinit (void);
+void _gnutls_ext_deinit (void);
diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c
index 8efd782770..58880ca610 100644
--- a/lib/gnutls_handshake.c
+++ b/lib/gnutls_handshake.c
@@ -1090,7 +1090,7 @@ _gnutls_recv_handshake_header (gnutls_session_t session,
_gnutls_handshake_log ("HSK[%p]: %s was received [%ld bytes]\n",
session, _gnutls_handshake2str (dataptr[0]),
- length32 + HANDSHAKE_HEADER_SIZE);
+ (long int) (length32 + HANDSHAKE_HEADER_SIZE));
}
else
@@ -1103,7 +1103,7 @@ _gnutls_recv_handshake_header (gnutls_session_t session,
_gnutls_handshake_log ("HSK[%p]: %s(v2) was received [%ld bytes]\n",
session, _gnutls_handshake2str (*recv_type),
- length32 + handshake_header_size);
+ (long int) (length32 + handshake_header_size));
if (*recv_type != GNUTLS_HANDSHAKE_CLIENT_HELLO)
{ /* it should be one or nothing */
diff --git a/lib/gnutls_mpi.c b/lib/gnutls_mpi.c
index 26d820e802..9b98010f2c 100644
--- a/lib/gnutls_mpi.c
+++ b/lib/gnutls_mpi.c
@@ -47,12 +47,11 @@ _gnutls_mpi_randomize (bigint_t r, unsigned int bits,
bigint_t tmp;
char tmpbuf[512];
opaque *buf;
- int buf_release;
+ int buf_release = 0;
if (size < sizeof (tmpbuf))
{
buf = tmpbuf;
- buf_release = 0;
}
else
{
diff --git a/lib/gnutls_x509.c b/lib/gnutls_x509.c
index 32b25310c6..d9e6b64be1 100644
--- a/lib/gnutls_x509.c
+++ b/lib/gnutls_x509.c
@@ -1945,7 +1945,6 @@ int
gnutls_x509_crt_t cert = NULL;
gnutls_x509_crl_t crl = NULL;
int ret;
- size_t size;
ret = gnutls_pkcs12_init (&p12);
if (ret < 0)