Fixed compiler warnings from egcs.

This commit is contained in:
Paul Slootman 1998-04-28 08:35:11 +00:00
parent 8be0230415
commit d6dbcb938f
16 changed files with 49 additions and 19 deletions

View File

@ -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;
}

View File

@ -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 */
}

View File

@ -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;
}

View File

@ -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;

View File

@ -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)

View File

@ -22,6 +22,11 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* 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
* anyway in that case.
*
* Revision 1.2 1997/02/21 13:18:27 fritz
* Reformatted, changed some error-messages.
*
@ -120,7 +125,7 @@ usage(void)
exit(-1);
}
void
int
main(int argc, char **argv)
{
@ -174,4 +179,5 @@ main(int argc, char **argv)
default:
break;
}
return 0;
}

View File

@ -21,6 +21,10 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.19 1998/04/18 17:36:13 detabc
* modify display of callbackdelay (cbdelay) value to %.1f sec.
* if abc-extension is enabled
*
* Revision 1.18 1998/03/21 17:10:36 detabc
* change to use the abc-ext-options -TU on all encapsulations
* the option -A (abc-router) will only works with rawip
@ -1432,9 +1436,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';
@ -1454,6 +1459,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;
}

View File

@ -19,6 +19,9 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.17 1998/03/08 12:13:49 luethje
* Patches by Paul Slootman
*
* Revision 1.16 1997/06/22 22:57:08 luethje
* bugfixes
*
@ -126,6 +129,7 @@
#define PUBLIC /**/
#define _ISDNTOOLS_C_
#define _GNU_SOURCE
/****************************************************************************/

View File

@ -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);

View File

@ -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:

View File

@ -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;
}
/**************************************************************************/

View File

@ -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;
}
/**************************************************************************/

View File

@ -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*/
}
/*************************************************************************/

View File

@ -34,7 +34,9 @@ from the X Consortium.
*
*/
#include <unistd.h>
#include <stdio.h>
#include <sys/ioctl.h>
#include <sys/fcntl.h>
#include <sys/time.h>
#include <sys/types.h>

View File

@ -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 */

View File

@ -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)