From: Nikos Mavrogiannopoulos Date: Mon, 13 Jul 2009 17:25:20 +0000 (+0300) Subject: Added casts to reduce warnings (based on report by Brad Hards). X-Git-Tag: gnutls_2_9_2~53 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eb6754077a0a055a55d15fa255e825b66fd90de0;p=thirdparty%2Fgnutls.git Added casts to reduce warnings (based on report by Brad Hards). --- diff --git a/lib/auth_srp.c b/lib/auth_srp.c index 2e25b260ce..634749c196 100644 --- a/lib/auth_srp.c +++ b/lib/auth_srp.c @@ -245,7 +245,7 @@ _gnutls_gen_srp_server_kx (gnutls_session_t session, opaque ** data) _gnutls_write_uint16 (n_b, data_b); - _gnutls_hard_log ("INT: SRP B[%d]: %s\n", n_b, + _gnutls_hard_log ("INT: SRP B[%d]: %s\n", (int)n_b, _gnutls_bin2hex (&data_b[2], n_b, buf, sizeof (buf))); _gnutls_srp_entry_free (pwd_entry); @@ -364,7 +364,7 @@ _gnutls_gen_srp_client_kx (gnutls_session_t session, opaque ** data) return GNUTLS_E_MPI_PRINT_FAILED; } - _gnutls_hard_log ("INT: SRP A[%d]: %s\n", n_a, + _gnutls_hard_log ("INT: SRP A[%d]: %s\n", (int)n_a, _gnutls_bin2hex (&data_a[2], n_a, buf, sizeof (buf))); _gnutls_mpi_release (&A); diff --git a/lib/gnutls_buffers.c b/lib/gnutls_buffers.c index a008e3f13b..52d3b41049 100644 --- a/lib/gnutls_buffers.c +++ b/lib/gnutls_buffers.c @@ -138,19 +138,19 @@ _gnutls_record_buffer_put (content_type_t type, case GNUTLS_APPLICATION_DATA: buf = &session->internals.application_data_buffer; _gnutls_buffers_log ("BUF[REC]: Inserted %d bytes of Data(%d)\n", - length, type); + (int)length, (int)type); break; case GNUTLS_HANDSHAKE: buf = &session->internals.handshake_data_buffer; _gnutls_buffers_log ("BUF[HSK]: Inserted %d bytes of Data(%d)\n", - length, type); + (int)length, (int)type); break; case GNUTLS_INNER_APPLICATION: buf = &session->internals.ia_data_buffer; _gnutls_buffers_log ("BUF[IA]: Inserted %d bytes of Data(%d)\n", - length, type); + (int)length, (int)type); break; default: @@ -221,20 +221,20 @@ _gnutls_record_buffer_get (content_type_t type, case GNUTLS_APPLICATION_DATA: _gnutls_buffer_get_data( &session->internals.application_data_buffer, data, &length); _gnutls_buffers_log ("BUFFER[REC][AD]: Read %d bytes of Data(%d)\n", - length, type); + (int)length, (int)type); break; case GNUTLS_HANDSHAKE: _gnutls_buffer_get_data( &session->internals.handshake_data_buffer, data, &length); _gnutls_buffers_log ("BUF[REC][HD]: Read %d bytes of Data(%d)\n", - length, type); + (int)length, (int)type); break; case GNUTLS_INNER_APPLICATION: _gnutls_buffer_get_data( &session->internals.ia_data_buffer, data, &length); _gnutls_buffers_log ("BUF[REC][IA]: Read %d bytes of Data(%d)\n", - length, type); + (int)length, (int)type); break; default: @@ -307,7 +307,7 @@ _gnutls_read (gnutls_session_t session, void *iptr, : errno; _gnutls_read_log ("READ: %d returned from %p, errno=%d gerrno=%d\n", - i, fd, errno, session->internals.errnum); + (int)i, fd, errno, session->internals.errnum); if (err == EAGAIN || err == EINTR) { @@ -315,7 +315,7 @@ _gnutls_read (gnutls_session_t session, void *iptr, { _gnutls_read_log ("READ: returning %d bytes from %p\n", - sizeOfPtr - left, fd); + (int)(sizeOfPtr - left), fd); goto finish; } @@ -334,7 +334,7 @@ _gnutls_read (gnutls_session_t session, void *iptr, else { - _gnutls_read_log ("READ: Got %d bytes from %p\n", i, fd); + _gnutls_read_log ("READ: Got %d bytes from %p\n", (int)i, fd); if (i == 0) break; /* EOF */ @@ -353,7 +353,7 @@ finish: _gnutls_read_log ("READ: read %d bytes from %p\n", - (sizeOfPtr - left), fd); + (int)(sizeOfPtr - left), fd); for (x = 0; x < ((sizeOfPtr - left) / 16) + 1; x++) { @@ -546,8 +546,8 @@ _gnutls_io_read_buffered (gnutls_session_t session, opaque ** iptr, { _gnutls_read_log ("RB: Have %d bytes into buffer. Adding %d bytes.\n", - session->internals.record_recv_buffer.length, ret); - _gnutls_read_log ("RB: Requested %d bytes\n", sizeOfPtr); + (int)session->internals.record_recv_buffer.length, (int)ret); + _gnutls_read_log ("RB: Requested %d bytes\n", (int)sizeOfPtr); session->internals.record_recv_buffer.length += ret; } @@ -569,10 +569,10 @@ _gnutls_io_read_buffered (gnutls_session_t session, opaque ** iptr, if (ret2 > 0) { - _gnutls_read_log ("RB-PEEK: Read %d bytes in PEEK MODE.\n", ret2); + _gnutls_read_log ("RB-PEEK: Read %d bytes in PEEK MODE.\n", (int)ret2); _gnutls_read_log ("RB-PEEK: Have %d bytes into buffer. Adding %d bytes.\nRB: Requested %d bytes\n", - session->internals.record_recv_buffer.length, ret2, sizeOfPtr); + (int)session->internals.record_recv_buffer.length, (int)ret2, (int)sizeOfPtr); session->internals.have_peeked_data = 1; session->internals.record_recv_buffer.length += ret2; @@ -663,10 +663,10 @@ _gnutls_io_write_buffered (gnutls_session_t session, n = bdata.size; _gnutls_write_log - ("WRITE: Restoring old write. (%d bytes to send)\n", n); + ("WRITE: Restoring old write. (%d bytes to send)\n", (int)n); } - _gnutls_write_log ("WRITE: Will write %d bytes to %p.\n", n, fd); + _gnutls_write_log ("WRITE: Will write %d bytes to %p.\n", (int)n, fd); i = 0; left = n; @@ -723,7 +723,7 @@ _gnutls_io_write_buffered (gnutls_session_t session, _gnutls_write_log ("WRITE: Interrupted. Stored %d bytes to buffer. Already sent %d bytes.\n", - left, n - left); + (int)left, (int)(n - left)); if (err == EAGAIN) return GNUTLS_E_AGAIN; @@ -746,7 +746,7 @@ _gnutls_io_write_buffered (gnutls_session_t session, _gnutls_write_log ("WRITE: wrote %d bytes to %p. Left %d bytes. Total %d bytes.\n", - i, fd, left, n); + (int)i, fd, (int)left, (int)n); for (x = 0; x < (unsigned) ((i) / 16) + 1; x++) { line[0] = 0; @@ -795,8 +795,8 @@ _gnutls_io_write_flush (gnutls_session_t session) return 0; /* done */ ret = _gnutls_io_write_buffered (session, NULL, 0); - _gnutls_write_log ("WRITE FLUSH: %d [buffer: %d]\n", ret, - session->internals.record_send_buffer.length); + _gnutls_write_log ("WRITE FLUSH: %d [buffer: %d]\n", (int)ret, + (int)session->internals.record_send_buffer.length); return ret; } @@ -816,7 +816,7 @@ _gnutls_handshake_io_write_flush (gnutls_session_t session) return ret; } - _gnutls_write_log ("HANDSHAKE_FLUSH: written[1] %d bytes\n", ret); + _gnutls_write_log ("HANDSHAKE_FLUSH: written[1] %d bytes\n", (int)ret); if (session->internals.handshake_send_buffer.length == 0) { @@ -1068,7 +1068,7 @@ _gnutls_handshake_buffer_put (gnutls_session_t session, opaque * data, return GNUTLS_E_HANDSHAKE_TOO_LARGE; } - _gnutls_buffers_log ("BUF[HSK]: Inserted %d bytes of Data\n", length); + _gnutls_buffers_log ("BUF[HSK]: Inserted %d bytes of Data\n", (int)length); if (_gnutls_buffer_append (&session->internals.handshake_hash_buffer, data, length) < 0) @@ -1099,7 +1099,7 @@ _gnutls_handshake_buffer_peek (gnutls_session_t session, opaque * data, length = session->internals.handshake_hash_buffer.length; } - _gnutls_buffers_log ("BUF[HSK]: Peeked %d bytes of Data\n", length); + _gnutls_buffers_log ("BUF[HSK]: Peeked %d bytes of Data\n", (int)length); memcpy (data, session->internals.handshake_hash_buffer.data, length); return length; @@ -1115,7 +1115,7 @@ _gnutls_handshake_buffer_get_ptr (gnutls_session_t session, if (length != NULL) *length = session->internals.handshake_hash_buffer.length; - _gnutls_buffers_log ("BUF[HSK]: Peeked %d bytes of Data\n", *length); + _gnutls_buffers_log ("BUF[HSK]: Peeked %d bytes of Data\n", (int)*length); if (data_ptr != NULL) *data_ptr = session->internals.handshake_hash_buffer.data; diff --git a/lib/gnutls_errors.c b/lib/gnutls_errors.c index 395d7569be..c97ff5dfa6 100644 --- a/lib/gnutls_errors.c +++ b/lib/gnutls_errors.c @@ -431,14 +431,14 @@ _gnutls_mpi_log (const char *prefix, bigint_t a) if (res != 0) { gnutls_assert (); - _gnutls_hard_log ("MPI: can't print value (%d/%d)\n", res, binlen); + _gnutls_hard_log ("MPI: can't print value (%d/%d)\n", res, (int)binlen); return; } if (binlen > 1024*1024) { gnutls_assert (); - _gnutls_hard_log ("MPI: too large mpi (%d)\n", binlen); + _gnutls_hard_log ("MPI: too large mpi (%d)\n", (int)binlen); return; } @@ -446,7 +446,7 @@ _gnutls_mpi_log (const char *prefix, bigint_t a) if (!binbuf) { gnutls_assert (); - _gnutls_hard_log ("MPI: out of memory (%d)\n", binlen); + _gnutls_hard_log ("MPI: out of memory (%d)\n", (int)binlen); return; } @@ -454,7 +454,7 @@ _gnutls_mpi_log (const char *prefix, bigint_t a) if (res != 0) { gnutls_assert (); - _gnutls_hard_log ("MPI: can't print value (%d/%d)\n", res, binlen); + _gnutls_hard_log ("MPI: can't print value (%d/%d)\n", res, (int)binlen); gnutls_free (binbuf); return; } @@ -465,14 +465,14 @@ _gnutls_mpi_log (const char *prefix, bigint_t a) if (!hexbuf) { gnutls_assert (); - _gnutls_hard_log ("MPI: out of memory (hex %d)\n", hexlen); + _gnutls_hard_log ("MPI: out of memory (hex %d)\n", (int)hexlen); gnutls_free (binbuf); return; } _gnutls_bin2hex (binbuf, binlen, hexbuf, hexlen); - _gnutls_hard_log ("MPI: length: %d\n\t%s%s\n", binlen, prefix, hexbuf); + _gnutls_hard_log ("MPI: length: %d\n\t%s%s\n", (int)binlen, prefix, hexbuf); gnutls_free (hexbuf); gnutls_free (binbuf); diff --git a/lib/gnutls_record.c b/lib/gnutls_record.c index 67ff3569d6..42869bec9e 100644 --- a/lib/gnutls_record.c +++ b/lib/gnutls_record.c @@ -373,7 +373,7 @@ _gnutls_send_int (gnutls_session_t session, content_type_t type, ("REC[%p]: Sending Packet[%d] %s(%d) with length: %d\n", session, (int) _gnutls_uint64touint32 (&session->connection_state. write_sequence_number), - _gnutls_packet2str (type), type, sizeofdata); + _gnutls_packet2str (type), type, (int)sizeofdata); if (sizeofdata > MAX_RECORD_SEND_SIZE) data2send_size = MAX_RECORD_SEND_SIZE; @@ -941,7 +941,7 @@ begin: ("REC[%p]: Expected Packet[%d] %s(%d) with length: %d\n", session, (int) _gnutls_uint64touint32 (&session->connection_state. read_sequence_number), - _gnutls_packet2str (type), type, sizeofdata); + _gnutls_packet2str (type), type, (int)sizeofdata); _gnutls_record_log ("REC[%p]: Received Packet[%d] %s(%d) with length: %d\n", session, (int) diff --git a/lib/gnutls_supplemental.c b/lib/gnutls_supplemental.c index b8c732c37e..d2439de12d 100644 --- a/lib/gnutls_supplemental.c +++ b/lib/gnutls_supplemental.c @@ -141,7 +141,7 @@ _gnutls_gen_supplemental (gnutls_session_t session, gnutls_buffer * buf) buf->data[2] = (buf->length - 3) & 0xFF; _gnutls_debug_log ("EXT[%p]: Sending %d bytes of supplemental data\n", - session, buf->length); + session, (int)buf->length); return buf->length; } diff --git a/lib/opencdk/armor.c b/lib/opencdk/armor.c index b4e5a27eec..5686809f01 100644 --- a/lib/opencdk/armor.c +++ b/lib/opencdk/armor.c @@ -595,7 +595,7 @@ armor_decode (void *data, FILE * in, FILE * out) afx->crc_okay = (afx->crc == crc2) ? 1 : 0; if (!afx->crc_okay && !rc) { - _cdk_log_debug ("file crc=%08lX afx_crc=%08lX\n", crc2, afx->crc); + _cdk_log_debug ("file crc=%08X afx_crc=%08X\n", (unsigned int)crc2, (unsigned int)afx->crc); rc = CDK_Armor_CRC_Error; } diff --git a/lib/opencdk/keydb.c b/lib/opencdk/keydb.c index a0aed60315..971e693819 100644 --- a/lib/opencdk/keydb.c +++ b/lib/opencdk/keydb.c @@ -663,7 +663,7 @@ keydb_cache_add (cdk_keydb_search_t dbs, off_t offset) k->next = dbs->cache; dbs->cache = k; dbs->ncache++; - _cdk_log_debug ("cache: add entry off=%d type=%d\n", offset, dbs->type); + _cdk_log_debug ("cache: add entry off=%d type=%d\n", (int)offset, (int)dbs->type); return 0; } diff --git a/lib/opencdk/literal.c b/lib/opencdk/literal.c index d01b69a6e4..1dde4a163e 100644 --- a/lib/opencdk/literal.c +++ b/lib/opencdk/literal.c @@ -121,7 +121,7 @@ literal_decode (void *data, FILE * in, FILE * out) while (!feof (in)) { _cdk_log_debug ("literal_decode: part on %d size %lu\n", - pfx->blkmode.on, pfx->blkmode.size); + (int)pfx->blkmode.on, pfx->blkmode.size); if (pfx->blkmode.on) bufsize = pfx->blkmode.size; else diff --git a/lib/opencdk/read-packet.c b/lib/opencdk/read-packet.c index 2869c2ce05..1f5008e2dd 100644 --- a/lib/opencdk/read-packet.c +++ b/lib/opencdk/read-packet.c @@ -128,15 +128,15 @@ read_mpi (cdk_stream_t inp, bigint_t * ret_m, int secure) if (nbits > MAX_MPI_BITS || nbits == 0) { - _cdk_log_debug ("read_mpi: too large %d bits\n", nbits); + _cdk_log_debug ("read_mpi: too large %d bits\n",(int) nbits); return CDK_MPI_Error; /* Sanity check */ } rc = stream_read (inp, buf + 2, nread, &nread); if (!rc && nread != ((nbits + 7) / 8)) { - _cdk_log_debug ("read_mpi: too short %d < %d\n", nread, - (nbits + 7) / 8); + _cdk_log_debug ("read_mpi: too short %d < %d\n", (int)nread, + (int)((nbits + 7) / 8)); return CDK_MPI_Error; } @@ -197,7 +197,7 @@ read_pubkey_enc (cdk_stream_t inp, size_t pktlen, cdk_pkt_pubkey_enc_t pke) return CDK_Inv_Value; if (DEBUG_PKT) - _cdk_log_debug ("read_pubkey_enc: %d octets\n", pktlen); + _cdk_log_debug ("read_pubkey_enc: %d octets\n", (int)pktlen); if (pktlen < 12) return CDK_Inv_Packet; @@ -251,7 +251,7 @@ read_compressed (cdk_stream_t inp, size_t pktlen, cdk_pkt_compressed_t c) return CDK_Inv_Value; if (DEBUG_PKT) - _cdk_log_debug ("read_compressed: %d octets\n", pktlen); + _cdk_log_debug ("read_compressed: %d octets\n", (int)pktlen); c->algorithm = cdk_stream_getc (inp); if (c->algorithm > 3) @@ -278,7 +278,7 @@ read_public_key (cdk_stream_t inp, size_t pktlen, cdk_pkt_pubkey_t pk) return CDK_Inv_Value; if (DEBUG_PKT) - _cdk_log_debug ("read_public_key: %d octets\n", pktlen); + _cdk_log_debug ("read_public_key: %d octets\n", (int)pktlen); pk->is_invalid = 1; /* default to detect missing self signatures */ pk->is_revoked = 0; @@ -336,7 +336,7 @@ read_secret_key (cdk_stream_t inp, size_t pktlen, cdk_pkt_seckey_t sk) return CDK_Inv_Value; if (DEBUG_PKT) - _cdk_log_debug ("read_secret_key: %d octets\n", pktlen); + _cdk_log_debug ("read_secret_key: %d octets\n", (int)pktlen); p1 = cdk_stream_tell (inp); rc = read_public_key (inp, pktlen, sk->pk); @@ -484,7 +484,7 @@ read_attribute (cdk_stream_t inp, size_t pktlen, cdk_pkt_userid_t attr) return CDK_Inv_Value; if (DEBUG_PKT) - _cdk_log_debug ("read_attribute: %d octets\n", pktlen); + _cdk_log_debug ("read_attribute: %d octets\n", (int) pktlen); strcpy (attr->name, "[attribute]"); attr->len = strlen (attr->name); @@ -631,7 +631,7 @@ read_onepass_sig (cdk_stream_t inp, size_t pktlen, cdk_pkt_onepass_sig_t sig) return CDK_Inv_Value; if (DEBUG_PKT) - _cdk_log_debug ("read_onepass_sig: %d octets\n", pktlen); + _cdk_log_debug ("read_onepass_sig: %d octets\n", (int)pktlen); if (pktlen != 13) return CDK_Inv_Packet; @@ -730,7 +730,7 @@ read_signature (cdk_stream_t inp, size_t pktlen, cdk_pkt_signature_t sig) return CDK_Inv_Value; if (DEBUG_PKT) - _cdk_log_debug ("read_signature: %d octets\n", pktlen); + _cdk_log_debug ("read_signature: %d octets\n", (int)pktlen); if (pktlen < 16) return CDK_Inv_Packet; @@ -822,7 +822,7 @@ read_literal (cdk_stream_t inp, size_t pktlen, return CDK_Inv_Value; if (DEBUG_PKT) - _cdk_log_debug ("read_literal: %d octets\n", pktlen); + _cdk_log_debug ("read_literal: %d octets\n", (int) pktlen); pt->mode = cdk_stream_getc (inp); if (pt->mode != 0x62 && pt->mode != 0x74 && pt->mode != 0x75) @@ -958,7 +958,7 @@ cdk_pkt_read (cdk_stream_t inp, cdk_packet_t pkt) if (!(ctb & 0x80)) { _cdk_log_info ("cdk_pkt_read: no openpgp data found. " - "(ctb=%02X; fpos=%02X)\n", ctb, cdk_stream_tell (inp)); + "(ctb=%02X; fpos=%02X)\n",(int) ctb, (int)cdk_stream_tell (inp)); return CDK_Inv_Packet; } diff --git a/lib/opencdk/sig-check.c b/lib/opencdk/sig-check.c index 38007299fa..d4e2c74b9d 100644 --- a/lib/opencdk/sig-check.c +++ b/lib/opencdk/sig-check.c @@ -541,9 +541,9 @@ cdk_pk_check_sigs (cdk_kbnode_t key, cdk_keydb_hd_t keydb, int *r_status) } } - _cdk_log_debug ("signature %s: signer %08lX keyid %08lX\n", - rc == CDK_Bad_Sig ? "BAD" : "good", sig->keyid[1], - keyid); + _cdk_log_debug ("signature %s: signer %08X keyid %08X\n", + rc == CDK_Bad_Sig ? "BAD" : "good", (unsigned int)sig->keyid[1], + (unsigned int)keyid); if (IS_UID_SIG (sig) && uid_name != NULL) { diff --git a/lib/opencdk/stream.c b/lib/opencdk/stream.c index d1061925b8..60823cbf5c 100644 --- a/lib/opencdk/stream.c +++ b/lib/opencdk/stream.c @@ -1059,7 +1059,7 @@ cdk_stream_write (cdk_stream_t s, const void *buf, size_t count) memcpy (s->cache.buf, old, s->cache.size); cdk_free (old); _cdk_log_debug ("stream: enlarge cache to %d octets\n", - s->cache.alloced); + (int)s->cache.alloced); } memcpy (s->cache.buf + s->cache.size, buf, count); s->cache.size += count; @@ -1579,7 +1579,7 @@ _cdk_stream_set_blockmode (cdk_stream_t s, size_t nbytes) { assert (s); - _cdk_log_debug ("stream: activate block mode with blocksize %d\n", nbytes); + _cdk_log_debug ("stream: activate block mode with blocksize %d\n", (int)nbytes); s->blkmode = nbytes; return 0; } diff --git a/src/certtool-cfg.c b/src/certtool-cfg.c index 679f04d9a6..c76c34bbe6 100644 --- a/src/certtool-cfg.c +++ b/src/certtool-cfg.c @@ -198,7 +198,7 @@ read_crt_set (gnutls_x509_crt_t crt, const char *input_str, const char *oid) int ret; fputs (input_str, stderr); - fgets (input, sizeof (input), stdin); + if (fgets (input, sizeof (input), stdin)==NULL) return; if (strlen (input) == 1) /* only newline */ return; @@ -219,7 +219,7 @@ read_crq_set (gnutls_x509_crq_t crq, const char *input_str, const char *oid) int ret; fputs (input_str, stderr); - fgets (input, sizeof (input), stdin); + if (fgets (input, sizeof (input), stdin)==NULL) return; if (strlen (input) == 1) /* only newline */ return; @@ -302,7 +302,7 @@ read_yesno (const char *input_str) char input[128]; fputs (input_str, stderr); - fgets (input, sizeof (input), stdin); + if (fgets (input, sizeof (input), stdin)==NULL) return 0; if (strlen (input) == 1) /* only newline */ return 0; diff --git a/tests/chainverify.c b/tests/chainverify.c index cd3598e8fd..73a3a85318 100644 --- a/tests/chainverify.c +++ b/tests/chainverify.c @@ -757,15 +757,15 @@ main (int argc, char *argv[]) gnutls_datum_t tmp; size_t j; - printf ("Chain '%s' (%d)...\n", chains[i].name, i); + printf ("Chain '%s' (%d)...\n", chains[i].name, (int)i); for (j = 0; chains[i].chain[j]; j++) { - printf ("\tAdding certificate %d...", j); + printf ("\tAdding certificate %d...", (int)j); ret = gnutls_x509_crt_init (&certs[j]); if (ret < 0) - error (EXIT_FAILURE, 0, "gnutls_x509_crt_init[%d,%d]: %s", i, j, + error (EXIT_FAILURE, 0, "gnutls_x509_crt_init[%d,%d]: %s", (int)i, (int)j, gnutls_strerror (ret)); tmp.data = (char *) chains[i].chain[j]; @@ -774,11 +774,11 @@ main (int argc, char *argv[]) ret = gnutls_x509_crt_import (certs[j], &tmp, GNUTLS_X509_FMT_PEM); printf ("done\n"); if (ret < 0) - error (EXIT_FAILURE, 0, "gnutls_x509_crt_import[%d,%d]: %s", i, j, + error (EXIT_FAILURE, 0, "gnutls_x509_crt_import[%d,%d]: %s", (int)i, (int)j, gnutls_strerror (ret)); gnutls_x509_crt_print (certs[j], GNUTLS_CRT_PRINT_ONELINE, &tmp); - printf ("\tCertificate %d: %.*s\n", j, tmp.size, tmp.data); + printf ("\tCertificate %d: %.*s\n", (int)j, tmp.size, tmp.data); gnutls_free (tmp.data); }