Small fixes to avoid warnings with newer gcc

This commit is contained in:
keil 2007-03-05 18:04:34 +00:00
parent b4ebc28847
commit 99ea40ec5a
5 changed files with 23 additions and 11 deletions

View File

@ -1,4 +1,4 @@
/* $Id: actctrl.c,v 1.3 2002/01/31 18:50:51 paul Exp $
/* $Id: actctrl.c,v 1.4 2007/03/05 18:04:34 keil Exp $
* IBM Active 2000 ISDN driver for Linux. (Control-Utility)
*
@ -19,6 +19,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: actctrl.c,v $
* Revision 1.4 2007/03/05 18:04:34 keil
* Small fixes to avoid warnings with newer gcc
*
* Revision 1.3 2002/01/31 18:50:51 paul
* #include <stdlib.h> for prototypes against warnings.
*
@ -73,7 +76,7 @@ main(int argc, char **argv)
act2000_cdef newcard;
cmd = strrchr(argv[0], '/');
cmd = (cmd == NULL) ? argv[0] : ++cmd;
cmd = (cmd == NULL) ? argv[0] : cmd + 1;
if (argc > 1) {
if (!strcmp(argv[1], "-d")) {
strcpy(ioctl_s.drvid, argv[2]);

View File

@ -1,4 +1,4 @@
/* $Id: fileheader.c,v 1.4 2001/03/01 14:59:12 paul Exp $ */
/* $Id: fileheader.c,v 1.5 2007/03/05 18:04:35 keil Exp $ */
/*
Copyright 1998 by Henner Eisen
@ -88,7 +88,8 @@ static char * tdu_print_file_par( int ct, unsigned char *pkt, unsigned char *end
if( pkt >= end ) goto packet_too_small;
if( (len = *(pkt++)) == 0xff ) {
if( pkt+2 > end ) goto packet_too_small;
len = 0x100 * *(pkt++) + *(pkt++);
len = 0x100 * pkt[0] + pkt[1];
pkt += 2;
}
tdu_printf (ct,"len=%d)", len);
ret = pkt + len;

View File

@ -1,4 +1,4 @@
/* $Id: tdu_log.c,v 1.2 2001/03/01 14:59:12 paul Exp $ */
/* $Id: tdu_log.c,v 1.3 2007/03/05 18:04:35 keil Exp $ */
/*
Copyright 1997 by Henner Eisen
@ -169,7 +169,7 @@ int tdu_log_prefix(const char * id_fmt, const char *tm_fmt)
int tdu_printf( int context, char * fmt, ... )
{
int ret, nl, i;
int ret = 0, nl, i;
va_list ap;
char tst[20];
@ -409,7 +409,8 @@ unsigned char * tdu_print_par( int ct, unsigned char *pkt, unsigned char *end, i
if( pkt >= end ) goto packet_too_small;
if( (len = *(pkt++)) == 0xff ) {
if( pkt+2 > end ) goto packet_too_small;
len = 0x100 * *(pkt++) + *(pkt++);
len = 0x100 * pkt[0] + pkt[1];
pkt += 2;
}
tdu_printf(ct,"len=%d)", len);
ret = pkt + len;

View File

@ -1,4 +1,4 @@
/* $Id: icnctrl.c,v 1.5 2002/01/31 18:55:45 paul Exp $
/* $Id: icnctrl.c,v 1.6 2007/03/05 18:04:35 keil Exp $
* ICN-ISDN driver for Linux. (Control-Utility)
*
@ -22,6 +22,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: icnctrl.c,v $
* Revision 1.6 2007/03/05 18:04:35 keil
* Small fixes to avoid warnings with newer gcc
*
* Revision 1.5 2002/01/31 18:55:45 paul
* #include <stdlib.h> for prototypes against warnings.
*
@ -223,7 +226,7 @@ main(int argc, char **argv)
icn_cdef newcard;
cmd = strrchr(argv[0], '/');
cmd = (cmd == NULL) ? argv[0] : ++cmd;
cmd = (cmd == NULL) ? argv[0] : cmd + 1;
if (argc > 1) {
if (!strcmp(argv[1], "-d")) {
strcpy(ioctl_s.drvid, argv[2]);

View File

@ -1,4 +1,4 @@
/* $Id: loopctrl.c,v 1.3 1999/09/06 08:03:26 fritz Exp $
/* $Id: loopctrl.c,v 1.4 2007/03/05 18:04:35 keil Exp $
* loop-ISDN driver for Linux. (Control-Utility)
*
@ -21,6 +21,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log: loopctrl.c,v $
* Revision 1.4 2007/03/05 18:04:35 keil
* Small fixes to avoid warnings with newer gcc
*
* Revision 1.3 1999/09/06 08:03:26 fritz
* Changed my mail-address.
*
@ -33,6 +36,7 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <fcntl.h>
@ -175,7 +179,7 @@ main(int argc, char **argv)
isdnloop_sdef startparm;
cmd = strrchr(argv[0], '/');
cmd = (cmd == NULL) ? argv[0] : ++cmd;
cmd = (cmd == NULL) ? argv[0] : cmd + 1;
if (argc > 1) {
if (!strcmp(argv[1], "-d")) {
strcpy(ioctl_s.drvid, argv[2]);