Fixed compiler warnings for gcc 4.1.x

This commit is contained in:
Michiel Broek
2007-08-25 18:32:07 +00:00
parent 51940ae330
commit 24e0ebcb45
13 changed files with 109 additions and 88 deletions

View File

@@ -5,7 +5,7 @@
* Remark ................: See below for more copyright details and credits.
*
*****************************************************************************
* Copyright (C) 1997-2005
* Copyright (C) 1997-2007
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
@@ -1042,7 +1042,7 @@ int hydra_batch(int role, file_list *to_send)
if (compstate == HCMP_GZ) {
txzlen = H_ZIPBUFLEN - 4;
destLen = (uLongf)txzlen;
rcz = compress2(txzbuf + 4, &destLen, txbuf + 4, txlen, 9);
rcz = compress2((Bytef *)txzbuf + 4, &destLen, (Bytef *)txbuf + 4, txlen, 9);
txzlen = (int)destLen;
if (rcz == Z_OK) {
Syslog('h', "Hydra: compressed OK, srclen=%d, destlen=%d, will send compressed=%s", txlen, txzlen,
@@ -1503,7 +1503,7 @@ int hydra_batch(int role, file_list *to_send)
if (pkttype == HPKT_ZIPDATA) {
rxzlen = H_ZIPBUFLEN;
destLen = (uLongf)rxzlen;
rcz = uncompress(rxzbuf, &destLen, rxbuf + 4, rxlen - 4);
rcz = uncompress((Bytef *)rxzbuf, &destLen, (Bytef *)rxbuf + 4, rxlen - 4);
rxzlen = (int)destLen;
if (rcz == Z_OK) {
/*

View File

@@ -556,7 +556,7 @@ int checkhello(void)
remaddr.name = NULL;
remaddr.domain = NULL;
if (hello2.my_name[0])
remaddr.domain = hello2.my_name + (strlen(hello2.my_name)) + 1;
remaddr.domain = (char *)hello2.my_name + (strlen((char *)hello2.my_name)) + 1;
if (remaddr.domain[0]) {
if ((q = strchr(remaddr.domain, '.')))
*q = '\0';
@@ -617,9 +617,9 @@ int checkhello(void)
else
Syslog('+', " uses: %s [%04X] version %d.%d", prodnm, hello2.product, majver, minver);
Syslog('+', " system: %s",(char*)hello2.my_name);
strncpy(history.system_name, hello2.my_name, 35);
strncpy(history.system_name, (char *)hello2.my_name, 35);
Syslog('+', " sysop: %s",(char*)hello2.sysop);
strncpy(history.sysop, hello2.sysop, 35);
strncpy(history.sysop, (char *)hello2.sysop, 35);
snprintf(history.location, 10, "Somewhere");
free(prodnm);