Fixed up some castings.

This commit is contained in:
Alexander Barton 2003-04-21 10:52:26 +00:00
parent f5b91cd03d
commit c3dfd63bf3
3 changed files with 13 additions and 12 deletions

View File

@ -19,7 +19,7 @@
#ifdef USE_ZLIB
static char UNUSED id[] = "$Id: conn-zip.c,v 1.2 2002/12/30 17:15:06 alex Exp $";
static char UNUSED id[] = "$Id: conn-zip.c,v 1.3 2003/04/21 10:52:26 alex Exp $";
#include "imp.h"
#include <assert.h>
@ -114,9 +114,9 @@ Zip_Flush( CONN_ID Idx )
out = &My_Connections[Idx].zip.out;
out->next_in = My_Connections[Idx].zip.wbuf;
out->next_in = (VOID *)My_Connections[Idx].zip.wbuf;
out->avail_in = My_Connections[Idx].zip.wdatalen;
out->next_out = My_Connections[Idx].wbuf + My_Connections[Idx].wdatalen;
out->next_out = (VOID *)(My_Connections[Idx].wbuf + My_Connections[Idx].wdatalen);
out->avail_out = WRITEBUFFER_LEN - My_Connections[Idx].wdatalen;
result = deflate( out, Z_SYNC_FLUSH );
@ -153,9 +153,9 @@ Unzip_Buffer( CONN_ID Idx )
in = &My_Connections[Idx].zip.in;
in->next_in = My_Connections[Idx].zip.rbuf;
in->next_in = (VOID *)My_Connections[Idx].zip.rbuf;
in->avail_in = My_Connections[Idx].zip.rdatalen;
in->next_out = My_Connections[Idx].rbuf + My_Connections[Idx].rdatalen;
in->next_out = (VOID *)(My_Connections[Idx].rbuf + My_Connections[Idx].rdatalen);
in->avail_out = READBUFFER_LEN - My_Connections[Idx].rdatalen - 1;
result = inflate( in, Z_SYNC_FLUSH );

View File

@ -16,7 +16,7 @@
#include "portab.h"
static char UNUSED id[] = "$Id: conn.c,v 1.121 2003/03/31 15:54:21 alex Exp $";
static char UNUSED id[] = "$Id: conn.c,v 1.122 2003/04/21 10:52:26 alex Exp $";
#include "imp.h"
#include <assert.h>
@ -798,6 +798,7 @@ Handle_Write( CONN_ID Idx )
/* Daten aus Schreibpuffer versenden bzw. Connection aufbauen */
INT len, res, err;
socklen_t sock_len;
CLIENT *c;
assert( Idx > NONE );
@ -811,9 +812,9 @@ Handle_Write( CONN_ID Idx )
FD_CLR( My_Connections[Idx].sock, &My_Connects );
/* Ergebnis des connect() ermitteln */
len = sizeof( err );
res = getsockopt( My_Connections[Idx].sock, SOL_SOCKET, SO_ERROR, &err, &len );
assert( len == sizeof( err ));
sock_len = sizeof( err );
res = getsockopt( My_Connections[Idx].sock, SOL_SOCKET, SO_ERROR, &err, &sock_len );
assert( sock_len == sizeof( err ));
/* Fehler aufgetreten? */
if(( res != 0 ) || ( err != 0 ))

View File

@ -14,7 +14,7 @@
#include "portab.h"
static char UNUSED id[] = "$Id: resolve.c,v 1.5 2002/12/26 17:04:54 alex Exp $";
static char UNUSED id[] = "$Id: resolve.c,v 1.6 2003/04/21 10:52:51 alex Exp $";
#include "imp.h"
#include <assert.h>
@ -186,7 +186,7 @@ Do_ResolveAddr( struct sockaddr_in *Addr, INT w_fd )
}
/* Antwort an Parent schreiben */
if( write( w_fd, hostname, strlen( hostname ) + 1 ) != ( strlen( hostname ) + 1 ))
if( (size_t)write( w_fd, hostname, strlen( hostname ) + 1 ) != (size_t)( strlen( hostname ) + 1 ))
{
Log_Resolver( LOG_CRIT, "Resolver: Can't write to parent: %s!", strerror( errno ));
close( w_fd );
@ -226,7 +226,7 @@ Do_ResolveName( CHAR *Host, INT w_fd )
}
/* Antwort an Parent schreiben */
if( write( w_fd, ip, strlen( ip ) + 1 ) != ( strlen( ip ) + 1 ))
if( (size_t)write( w_fd, ip, strlen( ip ) + 1 ) != (size_t)( strlen( ip ) + 1 ))
{
Log_Resolver( LOG_CRIT, "Resolver: Can't write to parent: %s!", strerror( errno ));
close( w_fd );