--- linux-atm-2.4.1/src/qgen/qlib.c.gcc4 2001-09-03 14:41:05.000000000 -0400 +++ linux-atm-2.4.1/src/qgen/qlib.c 2005-08-22 09:04:36.000000000 -0400 @@ -26,8 +26,6 @@ int q_dump = 0; #include "op.h" -static int debug = 0; - void PREFIX(report)(int severity,const char *msg,...) { @@ -830,6 +828,8 @@ int PREFIX(close)(Q_DSC *dsc) #ifdef STANDALONE +int debug = 0; + int main(int argc,const char **argv) { unsigned char msg[5000]; /* should be large enough for that */ --- linux-atm-2.4.1/src/qgen/qlib.h.gcc4 2001-09-03 14:41:05.000000000 -0400 +++ linux-atm-2.4.1/src/qgen/qlib.h 2005-08-22 09:05:07.000000000 -0400 @@ -22,8 +22,9 @@ #define Q_ERROR 0 #define Q_FATAL -1 - +#ifndef DUMP_MODE extern int q_dump; +#endif extern void q_report(int severity,const char *msg,...); #ifdef DUMP_MODE --- linux-atm-2.4.1/src/maint/atmtcp.c.gcc4 2001-09-03 14:41:06.000000000 -0400 +++ linux-atm-2.4.1/src/maint/atmtcp.c 2005-08-22 09:04:36.000000000 -0400 @@ -60,7 +60,7 @@ static OUT *outputs = NULL; static IN *inputs = NULL; static fd_set in_set; static int fds = 0; -static int debug = 0; +int debug = 0; static int links = 0; --- linux-atm-2.4.1/src/ilmid/atmf_uni.c.gcc4 2001-09-03 14:41:06.000000000 -0400 +++ linux-atm-2.4.1/src/ilmid/atmf_uni.c 2005-08-22 09:04:36.000000000 -0400 @@ -187,7 +187,7 @@ AsnInt setNetPrefix(VarBind *varbind, Va newPrefix->name = alloc_t(AsnOid); newPrefix->name->octs = alloc(varBindName->octetLen); AsnOidCopy(newPrefix->name, varBindName); - Q_INSERT_BEFORE((NetPrefixNode *) var->value, newPrefix, prefix); + Q_INSERT_BEFORE((*((NetPrefixNode **)&var->value)), newPrefix, prefix); if(atmNetPrefix.octs == NULL) { atmNetPrefix.octetLen = varBindName->octetLen - NETPREFIX_LEN - 2; @@ -197,7 +197,7 @@ AsnInt setNetPrefix(VarBind *varbind, Va } else if (varbind->value->a.simple->a.number == INVALID && cmp == AsnOidEqual) { - Q_REMOVE((NetPrefixNode *) var->value, prefix); + Q_REMOVE((*((NetPrefixNode **) &var->value)), prefix); } return NOERROR; --- linux-atm-2.4.1/src/mpoad/p_factory.c.gcc4 2001-09-03 14:41:06.000000000 -0400 +++ linux-atm-2.4.1/src/mpoad/p_factory.c 2005-08-22 09:04:36.000000000 -0400 @@ -31,16 +31,17 @@ unsigned short compute_ip_csum(unsigned * beginning at location "addr". */ uint32_t sum = 0; + uint16_t *addr16 = addr; while( count > 1 ) { /* This is the inner loop */ - sum += * ((uint16_t *) addr)++; + sum += * addr16++; count -= 2; } /* Add left-over byte, if any */ if( count > 0 ) - sum += * (unsigned char *) addr; + sum += * (unsigned char *) addr16; /* Fold 32-bit sum to 16 bits */ while (sum>>16) --- linux-atm-2.4.1/src/switch/debug/debug.c.gcc4 2001-09-03 14:41:06.000000000 -0400 +++ linux-atm-2.4.1/src/switch/debug/debug.c 2005-08-22 09:04:36.000000000 -0400 @@ -18,7 +18,7 @@ #define COMPONENT "FAB(debug)" -#define PRV(call) ((FAB *) (call)->fab) +#define PRV(call) (*((FAB **) &(call)->fab)) typedef struct _fab { --- linux-atm-2.4.1/src/switch/tcp/tcpsw.c.gcc4 2001-09-03 14:41:06.000000000 -0400 +++ linux-atm-2.4.1/src/switch/tcp/tcpsw.c 2005-08-22 09:04:36.000000000 -0400 @@ -27,7 +27,7 @@ #define COMPONENT "FAB(tcp)" -#define PRV(call) ((FAB *) (call)->fab) +#define PRV(call) (*((FAB **) &(call)->fab)) #define MAX_VCI 1024