wmbiff: Fix signedness and/or cast.
This commit is contained in:
parent
fddfe9c2ec
commit
7b53eab0b4
|
@ -39,7 +39,7 @@ void print_x509_info(gnutls_session session, const char* hostname)
|
||||||
{
|
{
|
||||||
gnutls_x509_crt crt;
|
gnutls_x509_crt crt;
|
||||||
const gnutls_datum *cert_list;
|
const gnutls_datum *cert_list;
|
||||||
int cert_list_size = 0, ret;
|
unsigned int cert_list_size = 0, ret;
|
||||||
char digest[20];
|
char digest[20];
|
||||||
char serial[40];
|
char serial[40];
|
||||||
char dn[256];
|
char dn[256];
|
||||||
|
|
|
@ -366,7 +366,7 @@ int test_sock_connect(void)
|
||||||
{
|
{
|
||||||
struct sockaddr_in addr;
|
struct sockaddr_in addr;
|
||||||
int s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
|
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) {
|
if (s < 0) {
|
||||||
perror("socket");
|
perror("socket");
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -124,7 +124,7 @@ static int wait_for_it(int sd, int timeoutseconds)
|
||||||
ProcessPendingEvents();
|
ProcessPendingEvents();
|
||||||
|
|
||||||
gettimeofday(&time_now, NULL);
|
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;
|
tv.tv_usec = 0;
|
||||||
/* select will return if we have X stuff or we have comm stuff on sd */
|
/* select will return if we have X stuff or we have comm stuff on sd */
|
||||||
FD_ZERO(&readfds);
|
FD_ZERO(&readfds);
|
||||||
|
@ -295,6 +295,7 @@ void tlscomm_printf(struct connection_state *scs, const char *format, ...)
|
||||||
va_list args;
|
va_list args;
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
int bytes;
|
int bytes;
|
||||||
|
ssize_t unused __attribute__((unused));
|
||||||
|
|
||||||
if (scs == NULL) {
|
if (scs == NULL) {
|
||||||
DMA(DEBUG_ERROR, "null connection to tlscomm_printf\n");
|
DMA(DEBUG_ERROR, "null connection to tlscomm_printf\n");
|
||||||
|
@ -316,7 +317,8 @@ void tlscomm_printf(struct connection_state *scs, const char *format, ...)
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
(void) write(scs->sd, buf, bytes);
|
/* Why???? */
|
||||||
|
unused = write(scs->sd, buf, bytes);
|
||||||
} else {
|
} else {
|
||||||
printf
|
printf
|
||||||
("warning: tlscomm_printf called with an invalid socket descriptor\n");
|
("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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ptr = (unsigned char *) strstr(b64_data.data, CERT_SEP) + 1;
|
ptr = (unsigned char *) strstr((char *) b64_data.data, CERT_SEP) + 1;
|
||||||
ptr = (unsigned char *) strstr(ptr, CERT_SEP);
|
ptr = (unsigned char *) strstr((char *) ptr, CERT_SEP);
|
||||||
|
|
||||||
b64_data.size = b64_data.size - (ptr - b64_data.data);
|
b64_data.size = b64_data.size - (ptr - b64_data.data);
|
||||||
b64_data.data = ptr;
|
b64_data.data = ptr;
|
||||||
|
@ -412,7 +414,7 @@ tls_check_certificate(struct connection_state *scs,
|
||||||
{
|
{
|
||||||
int certstat;
|
int certstat;
|
||||||
const gnutls_datum *cert_list;
|
const gnutls_datum *cert_list;
|
||||||
int cert_list_size = 0;
|
unsigned int cert_list_size = 0;
|
||||||
gnutls_x509_crt cert;
|
gnutls_x509_crt cert;
|
||||||
|
|
||||||
if (gnutls_auth_get_type(scs->tls_state) != GNUTLS_CRD_CERTIFICATE) {
|
if (gnutls_auth_get_type(scs->tls_state) != GNUTLS_CRD_CERTIFICATE) {
|
||||||
|
|
Loading…
Reference in a new issue