diff --git a/imontty/imontty.c b/imontty/imontty.c index c8400692..260961c3 100644 --- a/imontty/imontty.c +++ b/imontty/imontty.c @@ -2,7 +2,7 @@ * * (c) 1995-97 Volker Götz * - * $Id: imontty.c,v 1.2 1997/04/05 14:18:30 calle Exp $ + * $Id: imontty.c,v 1.3 1998/04/28 08:33:52 paul Exp $ */ #include @@ -157,7 +157,7 @@ void scan_int(char * buffer, int (*field)[], int max) { } } -void main(int ac, char **argv) { +int main(int ac, char **argv) { FILE * isdninfo; char buf[IM_BUFSIZE]; @@ -250,4 +250,5 @@ void main(int ac, char **argv) { if( !(++lines % 2) ) printf("\n"); } + return 0; } diff --git a/ipppd/main.c b/ipppd/main.c index e68e1a01..873f3064 100644 --- a/ipppd/main.c +++ b/ipppd/main.c @@ -25,7 +25,7 @@ * PATCHLEVEL 9 */ -char main_rcsid[] = "$Id: main.c,v 1.12 1998/03/25 13:13:38 hipp Exp $"; +char main_rcsid[] = "$Id: main.c,v 1.13 1998/04/28 08:33:57 paul Exp $"; #include #include @@ -136,7 +136,7 @@ struct protent *protocols[] = { NULL }; -void main(int argc,char **argv) +int main(int argc,char **argv) { int i,j; struct sigaction sa; @@ -284,7 +284,12 @@ void main(int argc,char **argv) #if 1 sprintf(pidfilename, "%s%s.pid", _PATH_VARRUN, "ipppd" ); #else - sprintf(pidfilename, "%s%s.%s.pid", _PATH_VARRUN, "ipppd", lns[0].devnam); + char *p; + if ((p = strrchr(lns[0].devnam, '/'))) + p++; + else + p = lns[0].devnam; + sprintf(pidfilename, "%s%s.%s.pid", _PATH_VARRUN, "ipppd", p); #endif if ((pidfile = fopen(pidfilename, "w")) != NULL) { @@ -442,6 +447,7 @@ void main(int argc,char **argv) syslog(LOG_WARNING, "unable to delete pid file: %m"); pidfilename[0] = 0; die(0); + return 0; /*NOTREACHED*/ } /* @@ -521,7 +527,7 @@ static int exit_unit(int the_unit) */ static void connect_time_expired(caddr_t arg) { - int linkunit = (int) arg; + int linkunit = (int)(long)arg; syslog(LOG_INFO, "Connect time expired"); lcp_close(linkunit, "Connect time expired"); /* Close connection */ } diff --git a/ipppd/options.c b/ipppd/options.c index bd8161f4..0de29fed 100644 --- a/ipppd/options.c +++ b/ipppd/options.c @@ -17,7 +17,7 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -char options_rcsid[] = "$Id: options.c,v 1.7 1998/03/22 18:52:33 hipp Exp $"; +char options_rcsid[] = "$Id: options.c,v 1.8 1998/04/28 08:34:00 paul Exp $"; #include #include @@ -2157,7 +2157,7 @@ static int setipxname (int slot,char **argv) fprintf (stderr, "%s: IPX router name is limited to %d characters\n", progname, - sizeof (ipxcp_wantoptions[slot].name) - 1); + (int) sizeof (ipxcp_wantoptions[slot].name) - 1); return 0; } diff --git a/ipppd/sys-linux.c b/ipppd/sys-linux.c index 229af891..7939f994 100644 --- a/ipppd/sys-linux.c +++ b/ipppd/sys-linux.c @@ -22,7 +22,7 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -char sys_rcsid[] = "$Id: sys-linux.c,v 1.11 1998/03/25 13:13:40 hipp Exp $"; +char sys_rcsid[] = "$Id: sys-linux.c,v 1.12 1998/04/28 08:34:05 paul Exp $"; #define _LINUX_STRING_H_ @@ -1314,7 +1314,7 @@ int logwtmputmp (int unit,char *line, char *name, char *host) strncpy(ut.ut_user, name, sizeof(ut.ut_user)); strncpy(ut.ut_line, line, sizeof(ut.ut_line)); - time(&ut.ut_time); + ut.ut_time = time((void *)0); ut.ut_type = USER_PROCESS; ut.ut_pid = mypid; diff --git a/ipppstats/ipppstats.c b/ipppstats/ipppstats.c index cd89d406..94da7b2a 100644 --- a/ipppstats/ipppstats.c +++ b/ipppstats/ipppstats.c @@ -37,7 +37,7 @@ */ #if 0 -static char rcsid[] = "$Id: ipppstats.c,v 1.4 1997/10/26 23:08:41 fritz Exp $"; +static char rcsid[] = "$Id: ipppstats.c,v 1.5 1998/04/28 08:34:15 paul Exp $"; #endif #include @@ -88,7 +88,7 @@ void intpr(void); void get_ppp_stats(struct ppp_stats *curp); void get_ppp_cstats(struct ppp_comp_stats *csp); -void main(int argc,char **argv) +int main(int argc,char **argv) { --argc; ++argv; while (argc > 0) { @@ -137,7 +137,7 @@ void main(int argc,char **argv) } intpr(); - exit(0); + return(0); } void usage(void) diff --git a/iprofd/iprofd.c b/iprofd/iprofd.c index c456bcf3..5fb21c76 100644 --- a/iprofd/iprofd.c +++ b/iprofd/iprofd.c @@ -1,4 +1,4 @@ -/* $Id: iprofd.c,v 1.3 1998/04/24 09:19:23 paul Exp $ +/* $Id: iprofd.c,v 1.4 1998/04/28 08:34:23 paul Exp $ * Daemon for saving ttyIx-profiles to a file. * @@ -22,6 +22,9 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Log: iprofd.c,v $ + * Revision 1.4 1998/04/28 08:34:23 paul + * Fixed compiler warnings from egcs. + * * Revision 1.3 1998/04/24 09:19:23 paul * Ignore empty file when starting up instead of generating error message * about wrong signature, there is _no_ signature! iprofd writes new data @@ -125,7 +128,7 @@ usage(void) exit(-1); } -void +int main(int argc, char **argv) { @@ -179,4 +182,5 @@ main(int argc, char **argv) default: break; } + return 0; } diff --git a/isdnctrl/isdnctrl.c b/isdnctrl/isdnctrl.c index 2e60ad9c..9c716cb6 100644 --- a/isdnctrl/isdnctrl.c +++ b/isdnctrl/isdnctrl.c @@ -1,4 +1,4 @@ -/* $Id: isdnctrl.c,v 1.19 1998/04/18 17:36:13 detabc Exp $ +/* $Id: isdnctrl.c,v 1.20 1998/04/28 08:34:28 paul Exp $ * ISDN driver for Linux. (Control-Utility) * * Copyright 1994,95 by Fritz Elfert (fritz@wuemaus.franken.de) @@ -21,6 +21,9 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Log: isdnctrl.c,v $ + * Revision 1.20 1998/04/28 08:34:28 paul + * Fixed compiler warnings from egcs. + * * Revision 1.19 1998/04/18 17:36:13 detabc * modify display of callbackdelay (cbdelay) value to %.1f sec. * if abc-extension is enabled @@ -1436,9 +1439,10 @@ void check_version() { } } -void main(int argc, char **argv) +int main(int argc, char **argv) { int fd; + int rc; if ((cmd = strrchr(argv[0], '/')) != NULL) *cmd++ = '\0'; @@ -1458,6 +1462,7 @@ void main(int argc, char **argv) } - exec_args(fd,argc-1,argv+1); + rc = exec_args(fd,argc-1,argv+1); close(fd); + return rc; } diff --git a/lib/isdntools.c b/lib/isdntools.c index 8f94e2d8..1ad46dce 100644 --- a/lib/isdntools.c +++ b/lib/isdntools.c @@ -1,4 +1,4 @@ -/* $Id: isdntools.c,v 1.17 1998/03/08 12:13:49 luethje Exp $ +/* $Id: isdntools.c,v 1.18 1998/04/28 08:34:36 paul Exp $ * * ISDN accounting for isdn4linux. (Utilities) * @@ -19,6 +19,9 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Log: isdntools.c,v $ + * Revision 1.18 1998/04/28 08:34:36 paul + * Fixed compiler warnings from egcs. + * * Revision 1.17 1998/03/08 12:13:49 luethje * Patches by Paul Slootman * @@ -129,6 +132,7 @@ #define PUBLIC /**/ #define _ISDNTOOLS_C_ +#define _GNU_SOURCE /****************************************************************************/ diff --git a/vbox/src/rcvbox.c b/vbox/src/rcvbox.c index add8f569..63396969 100644 --- a/vbox/src/rcvbox.c +++ b/vbox/src/rcvbox.c @@ -1,5 +1,5 @@ /* -** $Id: rcvbox.c,v 1.5 1997/05/10 10:58:47 michael Exp $ +** $Id: rcvbox.c,v 1.6 1998/04/28 08:34:44 paul Exp $ ** ** Copyright (C) 1996, 1997 Michael 'Ghandi' Herold */ @@ -65,7 +65,7 @@ static time_t vboxrc_return_time(time_t timenow, char *timestr, int mode) else *minsstr++ = '\0'; if (mode == 0) secsint = 0; - if (mode != 0) secsint = 59; + else secsint = 59; hourint = atoi(hourstr); minsint = atoi(minsstr); diff --git a/vbox/src/script.c b/vbox/src/script.c index da256aee..e257d7c3 100644 --- a/vbox/src/script.c +++ b/vbox/src/script.c @@ -1,5 +1,5 @@ /* -** $Id: script.c,v 1.9 1997/10/22 20:47:13 fritz Exp $ +** $Id: script.c,v 1.10 1998/04/28 08:34:47 paul Exp $ ** ** Copyright (C) 1996, 1997 Michael 'Ghandi' Herold */ @@ -259,7 +259,7 @@ int vbox_message_info(ClientData cd, Tcl_Interp *ip, int argc, char *argv[]) switch (field) { case 1: - printstring(ip->result, "%ld", ntohl(header.time)); + printstring(ip->result, "%ld", (long)ntohl(header.time)); break; case 2: diff --git a/vbox/src/vbox.c b/vbox/src/vbox.c index c18e3031..df603de6 100644 --- a/vbox/src/vbox.c +++ b/vbox/src/vbox.c @@ -1,5 +1,5 @@ /* -** $Id: vbox.c,v 1.7 1998/03/26 13:10:37 keil Exp $ +** $Id: vbox.c,v 1.8 1998/04/28 08:34:50 paul Exp $ ** ** Copyright (C) 1996, 1997 Michael 'Ghandi' Herold */ @@ -161,7 +161,7 @@ static chtype color(int); /** The magic main... **/ /**************************************************************************/ -void main(int argc, char **argv) +int main(int argc, char **argv) { struct servent *vboxdserv; int dimension; @@ -347,6 +347,7 @@ void main(int argc, char **argv) vboxd_disconnect(); if (messagesmp) free(messagesmp); + return 0; } /**************************************************************************/ diff --git a/vbox/src/vboxd.c b/vbox/src/vboxd.c index 75759d52..aa74015a 100644 --- a/vbox/src/vboxd.c +++ b/vbox/src/vboxd.c @@ -1,5 +1,5 @@ /* -** $Id: vboxd.c,v 1.4 1997/05/10 10:58:57 michael Exp $ +** $Id: vboxd.c,v 1.5 1998/04/28 08:34:52 paul Exp $ ** ** Copyright (C) 1996, 1997 Michael 'Ghandi' Herold */ @@ -120,7 +120,7 @@ static struct option arguments[] = /** The magic main... **/ /**************************************************************************/ -void main(int argc, char **argv) +int main(int argc, char **argv) { int opts; @@ -202,6 +202,7 @@ void main(int argc, char **argv) handle_client_input(); leave_program(0); + return 0; } /**************************************************************************/ diff --git a/vbox/src/vboxgetty.c b/vbox/src/vboxgetty.c index b0c68485..6b203d1a 100644 --- a/vbox/src/vboxgetty.c +++ b/vbox/src/vboxgetty.c @@ -1,5 +1,5 @@ /* -** $Id: vboxgetty.c,v 1.7 1997/10/22 20:47:19 fritz Exp $ +** $Id: vboxgetty.c,v 1.8 1998/04/28 08:34:56 paul Exp $ ** ** Copyright (C) 1996, 1997 Michael 'Ghandi' Herold */ @@ -53,7 +53,7 @@ static struct option arguments[] = /** The magic main... **/ /*************************************************************************/ -void main(int argc, char **argv) +int main(int argc, char **argv) { char *usevrc = NULL; char *device = NULL; @@ -127,6 +127,7 @@ void main(int argc, char **argv) main_program(); exit_program(SIGTERM); + return 0; /*NOTREACHED*/ } /*************************************************************************/ diff --git a/xisdnload/xisdnload.c b/xisdnload/xisdnload.c index 33e2d304..e60bd1c0 100644 --- a/xisdnload/xisdnload.c +++ b/xisdnload/xisdnload.c @@ -34,7 +34,9 @@ from the X Consortium. * */ +#include #include +#include #include #include #include diff --git a/xmonisdn/Net.c b/xmonisdn/Net.c index 62e94de1..b13ea317 100644 --- a/xmonisdn/Net.c +++ b/xmonisdn/Net.c @@ -518,7 +518,7 @@ static void Redisplay (gw, event, region) static void check_netstat (w) NetstatWidget w; { - int newstate; + int newstate = 0; struct timeval timeout; fd_set fdset; @@ -667,7 +667,7 @@ static void redraw_netstat (w) register int x, y; GC gc = w->netstat.gc; Pixel back = w->core.background_pixel; - struct _mbimage *im; + struct _mbimage *im = 0; /* center the picture in the window */ diff --git a/xmonisdn/xmonisdn.c b/xmonisdn/xmonisdn.c index a61ec6f1..4e0b4509 100644 --- a/xmonisdn/xmonisdn.c +++ b/xmonisdn/xmonisdn.c @@ -47,7 +47,7 @@ NULL}; } -void main (argc, argv) +int main (argc, argv) int argc; char **argv; { @@ -76,6 +76,8 @@ void main (argc, argv) (void) XSetWMProtocols (XtDisplay(toplevel), XtWindow(toplevel), &wm_delete_window, 1); XtAppMainLoop (xtcontext); + + return 0; } static void quit (w, event, params, num_params)