mirror of
				https://github.com/osmarks/ngircd.git
				synced 2025-11-04 07:52:59 +00:00 
			
		
		
		
	Fixed some warnings of non-gcc-compilers (e. g. original Apple compiler on
A/UX): "warning: illegal pointer combination, op =".
This commit is contained in:
		@@ -17,7 +17,7 @@
 | 
			
		||||
 | 
			
		||||
#include "portab.h"
 | 
			
		||||
 | 
			
		||||
static char UNUSED id[] = "$Id: channel.c,v 1.44 2004/01/17 03:17:49 alex Exp $";
 | 
			
		||||
static char UNUSED id[] = "$Id: channel.c,v 1.45 2004/03/11 22:16:31 alex Exp $";
 | 
			
		||||
 | 
			
		||||
#include "imp.h"
 | 
			
		||||
#include <assert.h>
 | 
			
		||||
@@ -708,7 +708,7 @@ Channel_Create( CHAR *Name )
 | 
			
		||||
 | 
			
		||||
	assert( Name != NULL );
 | 
			
		||||
	
 | 
			
		||||
	c = malloc( sizeof( CHANNEL ));
 | 
			
		||||
	c = (CHANNEL *)malloc( sizeof( CHANNEL ));
 | 
			
		||||
	if( ! c )
 | 
			
		||||
	{
 | 
			
		||||
		Log( LOG_EMERG, "Can't allocate memory! [New_Chan]" );
 | 
			
		||||
@@ -760,7 +760,7 @@ Add_Client( CHANNEL *Chan, CLIENT *Client )
 | 
			
		||||
	assert( Client != NULL );
 | 
			
		||||
 | 
			
		||||
	/* neue CL2CHAN-Struktur anlegen */
 | 
			
		||||
	cl2chan = malloc( sizeof( CL2CHAN ));
 | 
			
		||||
	cl2chan = (CL2CHAN *)malloc( sizeof( CL2CHAN ));
 | 
			
		||||
	if( ! cl2chan )
 | 
			
		||||
	{
 | 
			
		||||
		Log( LOG_EMERG, "Can't allocate memory! [Add_Client]" );
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,7 @@
 | 
			
		||||
 | 
			
		||||
#include "portab.h"
 | 
			
		||||
 | 
			
		||||
static char UNUSED id[] = "$Id: client.c,v 1.75 2004/01/17 03:17:49 alex Exp $";
 | 
			
		||||
static char UNUSED id[] = "$Id: client.c,v 1.76 2004/03/11 22:16:31 alex Exp $";
 | 
			
		||||
 | 
			
		||||
#include "imp.h"
 | 
			
		||||
#include <assert.h>
 | 
			
		||||
@@ -1024,7 +1024,7 @@ New_Client_Struct( VOID )
 | 
			
		||||
	
 | 
			
		||||
	CLIENT *c;
 | 
			
		||||
	
 | 
			
		||||
	c = malloc( sizeof( CLIENT ));
 | 
			
		||||
	c = (CLIENT *)malloc( sizeof( CLIENT ));
 | 
			
		||||
	if( ! c )
 | 
			
		||||
	{
 | 
			
		||||
		Log( LOG_EMERG, "Can't allocate memory! [New_Client_Struct]" );
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@
 | 
			
		||||
 | 
			
		||||
#include "portab.h"
 | 
			
		||||
 | 
			
		||||
static char UNUSED id[] = "$Id: conn.c,v 1.132 2004/02/28 02:01:01 alex Exp $";
 | 
			
		||||
static char UNUSED id[] = "$Id: conn.c,v 1.133 2004/03/11 22:16:31 alex Exp $";
 | 
			
		||||
 | 
			
		||||
#include "imp.h"
 | 
			
		||||
#include <assert.h>
 | 
			
		||||
@@ -117,7 +117,7 @@ Conn_Init( VOID )
 | 
			
		||||
		/* konfiguriertes Limit beachten */
 | 
			
		||||
		if( Pool_Size > Conf_MaxConnections ) Pool_Size = Conf_MaxConnections;
 | 
			
		||||
	}
 | 
			
		||||
	My_Connections = malloc( sizeof( CONNECTION ) * Pool_Size );
 | 
			
		||||
	My_Connections = (CONNECTION *)malloc( sizeof( CONNECTION ) * Pool_Size );
 | 
			
		||||
	if( ! My_Connections )
 | 
			
		||||
	{
 | 
			
		||||
		/* Speicher konnte nicht alloziert werden! */
 | 
			
		||||
@@ -1003,11 +1003,11 @@ New_Connection( INT Sock )
 | 
			
		||||
		/* zunaechst realloc() versuchen; wenn das scheitert, malloc() versuchen
 | 
			
		||||
		 * und Daten ggf. "haendisch" umkopieren. (Haesslich! Eine wirklich
 | 
			
		||||
		 * dynamische Verwaltung waere wohl _deutlich_ besser ...) */
 | 
			
		||||
		ptr = realloc( My_Connections, sizeof( CONNECTION ) * new_size );
 | 
			
		||||
		ptr = (POINTER *)realloc( My_Connections, sizeof( CONNECTION ) * new_size );
 | 
			
		||||
		if( ! ptr )
 | 
			
		||||
		{
 | 
			
		||||
			/* realloc() ist fehlgeschlagen. Nun malloc() probieren: */
 | 
			
		||||
			ptr = malloc( sizeof( CONNECTION ) * new_size );
 | 
			
		||||
			ptr = (POINTER *)malloc( sizeof( CONNECTION ) * new_size );
 | 
			
		||||
			if( ! ptr )
 | 
			
		||||
			{
 | 
			
		||||
				/* Offenbar steht kein weiterer Sepeicher zur Verfuegung :-( */
 | 
			
		||||
@@ -1029,7 +1029,7 @@ New_Connection( INT Sock )
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
		/* Adjust pointer to new block */
 | 
			
		||||
		My_Connections = ptr;
 | 
			
		||||
		My_Connections = (CONNECTION *)ptr;
 | 
			
		||||
 | 
			
		||||
		/* Initialize new items */
 | 
			
		||||
		for( idx = Pool_Size; idx < new_size; idx++ ) Init_Conn_Struct( idx );
 | 
			
		||||
 
 | 
			
		||||
@@ -14,7 +14,7 @@
 | 
			
		||||
 | 
			
		||||
#include "portab.h"
 | 
			
		||||
 | 
			
		||||
static char UNUSED id[] = "$Id: irc-channel.c,v 1.25 2003/01/08 22:04:05 alex Exp $";
 | 
			
		||||
static char UNUSED id[] = "$Id: irc-channel.c,v 1.26 2004/03/11 22:16:31 alex Exp $";
 | 
			
		||||
 | 
			
		||||
#include "imp.h"
 | 
			
		||||
#include <assert.h>
 | 
			
		||||
@@ -68,7 +68,7 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req )
 | 
			
		||||
	channame = strtok( Req->argv[0], "," );
 | 
			
		||||
	while( channame )
 | 
			
		||||
	{
 | 
			
		||||
		chan = flags = NULL;
 | 
			
		||||
		chan = NULL; flags = NULL;
 | 
			
		||||
 | 
			
		||||
		/* wird der Channel neu angelegt? */
 | 
			
		||||
		if( Channel_Search( channame )) is_new_chan = FALSE;
 | 
			
		||||
 
 | 
			
		||||
@@ -14,7 +14,7 @@
 | 
			
		||||
 | 
			
		||||
#include "portab.h"
 | 
			
		||||
 | 
			
		||||
static char UNUSED id[] = "$Id: irc-login.c,v 1.39 2004/02/04 19:56:05 alex Exp $";
 | 
			
		||||
static char UNUSED id[] = "$Id: irc-login.c,v 1.40 2004/03/11 22:16:31 alex Exp $";
 | 
			
		||||
 | 
			
		||||
#include "imp.h"
 | 
			
		||||
#include <assert.h>
 | 
			
		||||
@@ -509,7 +509,7 @@ Kill_Nick( CHAR *Nick, CHAR *Reason )
 | 
			
		||||
	assert( Nick != NULL );
 | 
			
		||||
	assert( Reason != NULL );
 | 
			
		||||
 | 
			
		||||
	r.prefix = Client_ThisServer( );
 | 
			
		||||
	r.prefix = (CHAR *)Client_ThisServer( );
 | 
			
		||||
	r.argv[0] = Nick;
 | 
			
		||||
	r.argv[1] = Reason;
 | 
			
		||||
	r.argc = 2;
 | 
			
		||||
 
 | 
			
		||||
@@ -14,7 +14,7 @@
 | 
			
		||||
 | 
			
		||||
#include "portab.h"
 | 
			
		||||
 | 
			
		||||
static char UNUSED id[] = "$Id: lists.c,v 1.12 2004/01/17 03:17:49 alex Exp $";
 | 
			
		||||
static char UNUSED id[] = "$Id: lists.c,v 1.13 2004/03/11 22:16:31 alex Exp $";
 | 
			
		||||
 | 
			
		||||
#include "imp.h"
 | 
			
		||||
#include <assert.h>
 | 
			
		||||
@@ -371,7 +371,7 @@ New_C2C( CHAR *Mask, CHANNEL *Chan, BOOLEAN OnlyOnce )
 | 
			
		||||
	assert( Chan != NULL );
 | 
			
		||||
 | 
			
		||||
	/* Speicher fuer Eintrag anfordern */
 | 
			
		||||
	c2c = malloc( sizeof( C2C ));
 | 
			
		||||
	c2c = (C2C *)malloc( sizeof( C2C ));
 | 
			
		||||
	if( ! c2c )
 | 
			
		||||
	{
 | 
			
		||||
		Log( LOG_EMERG, "Can't allocate memory! [New_C2C]" );
 | 
			
		||||
 
 | 
			
		||||
@@ -14,7 +14,7 @@
 | 
			
		||||
 | 
			
		||||
#include "portab.h"
 | 
			
		||||
 | 
			
		||||
static char UNUSED id[] = "$Id: resolve.c,v 1.7 2003/12/27 13:01:12 alex Exp $";
 | 
			
		||||
static char UNUSED id[] = "$Id: resolve.c,v 1.8 2004/03/11 22:16:31 alex Exp $";
 | 
			
		||||
 | 
			
		||||
#include "imp.h"
 | 
			
		||||
#include <assert.h>
 | 
			
		||||
@@ -78,7 +78,7 @@ Resolve_Addr( struct sockaddr_in *Addr )
 | 
			
		||||
	INT pid;
 | 
			
		||||
 | 
			
		||||
	/* Allocate memory */
 | 
			
		||||
	s = malloc( sizeof( RES_STAT ));
 | 
			
		||||
	s = (RES_STAT *)malloc( sizeof( RES_STAT ));
 | 
			
		||||
	if( ! s )
 | 
			
		||||
	{
 | 
			
		||||
		Log( LOG_EMERG, "Resolver: Can't allocate memory! [Resolve_Addr]" );
 | 
			
		||||
@@ -136,7 +136,7 @@ Resolve_Name( CHAR *Host )
 | 
			
		||||
	INT pid;
 | 
			
		||||
 | 
			
		||||
	/* Allocate memory */
 | 
			
		||||
	s = malloc( sizeof( RES_STAT ));
 | 
			
		||||
	s = (RES_STAT *)malloc( sizeof( RES_STAT ));
 | 
			
		||||
	if( ! s )
 | 
			
		||||
	{
 | 
			
		||||
		Log( LOG_EMERG, "Resolver: Can't allocate memory! [Resolve_Name]" );
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user