[Pkg-wmaker-commits] [wmbiff] 10/92: wmbiff: Fix signedness and/or cast.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Thu Aug 20 02:59:19 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmbiff.

commit ee834e3045e9f15fe9e5e097cb9aa831059df043
Author: Gabriel VLASIU <gabriel at vlasiu.net>
Date:   Wed Apr 3 18:42:40 2013 +0300

    wmbiff: Fix signedness and/or cast.
---
 wmbiff/gnutls-common.c |  2 +-
 wmbiff/test_wmbiff.c   |  2 +-
 wmbiff/tlsComm.c       | 12 +++++++-----
 3 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/wmbiff/gnutls-common.c b/wmbiff/gnutls-common.c
index 22eee10..d199d47 100644
--- a/wmbiff/gnutls-common.c
+++ b/wmbiff/gnutls-common.c
@@ -39,7 +39,7 @@ void print_x509_info(gnutls_session session, const char* hostname)
 {
 	gnutls_x509_crt crt;
 	const gnutls_datum *cert_list;
-	int cert_list_size = 0, ret;
+	unsigned int cert_list_size = 0, ret;
 	char digest[20];
 	char serial[40];
 	char dn[256];
diff --git a/wmbiff/test_wmbiff.c b/wmbiff/test_wmbiff.c
index 10ffea5..950cbb6 100644
--- a/wmbiff/test_wmbiff.c
+++ b/wmbiff/test_wmbiff.c
@@ -366,7 +366,7 @@ int test_sock_connect(void)
 {
 	struct sockaddr_in addr;
 	int s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
-	int addrlen = sizeof(struct sockaddr_in);
+	socklen_t addrlen = sizeof(struct sockaddr_in);
 	if (s < 0) {
 		perror("socket");
 		return 1;
diff --git a/wmbiff/tlsComm.c b/wmbiff/tlsComm.c
index f4896fe..05e6dd8 100644
--- a/wmbiff/tlsComm.c
+++ b/wmbiff/tlsComm.c
@@ -124,7 +124,7 @@ static int wait_for_it(int sd, int timeoutseconds)
             ProcessPendingEvents();
 
             gettimeofday(&time_now, NULL);
-            tv.tv_sec = max(time_out.tv_sec - time_now.tv_sec + 1, 0); /* sloppy, but bfd */
+            tv.tv_sec = max(time_out.tv_sec - time_now.tv_sec + 1, (time_t) 0); /* sloppy, but bfd */
             tv.tv_usec = 0;
             /* select will return if we have X stuff or we have comm stuff on sd */
             FD_ZERO(&readfds);
@@ -295,6 +295,7 @@ void tlscomm_printf(struct connection_state *scs, const char *format, ...)
 	va_list args;
 	char buf[1024];
 	int bytes;
+	ssize_t unused __attribute__((unused));
 
 	if (scs == NULL) {
 		DMA(DEBUG_ERROR, "null connection to tlscomm_printf\n");
@@ -316,7 +317,8 @@ void tlscomm_printf(struct connection_state *scs, const char *format, ...)
 			}
 		} else
 #endif
-			(void) write(scs->sd, buf, bytes);
+			/* Why???? */
+			unused = write(scs->sd, buf, bytes);
 	} else {
 		printf
 			("warning: tlscomm_printf called with an invalid socket descriptor\n");
@@ -382,8 +384,8 @@ static int tls_compare_certificates(const gnutls_datum * peercert)
 			return 0;
 		}
 
-		ptr = (unsigned char *) strstr(b64_data.data, CERT_SEP) + 1;
-		ptr = (unsigned char *) strstr(ptr, CERT_SEP);
+		ptr = (unsigned char *) strstr((char *) b64_data.data, CERT_SEP) + 1;
+		ptr = (unsigned char *) strstr((char *) ptr, CERT_SEP);
 
 		b64_data.size = b64_data.size - (ptr - b64_data.data);
 		b64_data.data = ptr;
@@ -412,7 +414,7 @@ tls_check_certificate(struct connection_state *scs,
 {
 	int certstat;
 	const gnutls_datum *cert_list;
-	int cert_list_size = 0;
+	unsigned int cert_list_size = 0;
 	gnutls_x509_crt cert;
 
 	if (gnutls_auth_get_type(scs->tls_state) != GNUTLS_CRD_CERTIFICATE) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbiff.git



More information about the Pkg-wmaker-commits mailing list