From: Thibault Godouet Date: Mon, 9 Jul 2001 21:07:28 +0000 (+0000) Subject: removed warnings (openbsd) adding some "(long int)", etc X-Git-Tag: ver2_9_4~287 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6a9989ff8e9a13788884a9f18a0402ff126d9919;p=thirdparty%2Ffcron.git removed warnings (openbsd) adding some "(long int)", etc --- diff --git a/convert-fcrontab.c b/convert-fcrontab.c index 20e78ed..30779d1 100644 --- a/convert-fcrontab.c +++ b/convert-fcrontab.c @@ -22,12 +22,12 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: convert-fcrontab.c,v 1.6 2001-07-07 17:33:19 thib Exp $ */ + /* $Id: convert-fcrontab.c,v 1.7 2001-07-09 21:08:15 thib Exp $ */ #include "convert-fcrontab.h" -char rcs_info[] = "$Id: convert-fcrontab.c,v 1.6 2001-07-07 17:33:19 thib Exp $"; +char rcs_info[] = "$Id: convert-fcrontab.c,v 1.7 2001-07-09 21:08:15 thib Exp $"; void info(void); void usage(void); @@ -215,7 +215,7 @@ convert_file(char *file_name) if ((file->cf_user = read_str(f, buf, sizeof(buf))) == NULL) die_e("Cannot read user's name"); - if ( fscanf(f, "%ld", &t_save) != 1 ) + if ( fscanf(f, "%ld", (long int *) &t_save) != 1 ) error("could not get time and date of saving"); /* read env variables */ diff --git a/fileconf.c b/fileconf.c index 56331e5..7421a08 100644 --- a/fileconf.c +++ b/fileconf.c @@ -22,7 +22,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: fileconf.c,v 1.49 2001-07-04 16:15:54 thib Exp $ */ + /* $Id: fileconf.c,v 1.50 2001-07-09 21:07:28 thib Exp $ */ #include "fcrontab.h" #include "fileconf.h" @@ -560,7 +560,8 @@ read_opt(char *ptr, CL *cl) if( ! in_brackets || (ptr=get_time(ptr, &(cl->cl_nextexe)))==NULL) Handle_err; if (debug_opt) - fprintf(stderr, " Opt : \"%s\" %ld\n",opt_name,cl->cl_nextexe); + fprintf(stderr, " Opt : \"%s\" %ld\n", opt_name, + (long int)cl->cl_nextexe); } else if(strcmp(opt_name, "r")==0 || strcmp(opt_name, "runfreq")==0) { @@ -783,7 +784,8 @@ read_opt(char *ptr, CL *cl) if( ! in_brackets || (ptr=get_time(ptr, &(cl->cl_until)))==NULL) Handle_err; if (debug_opt) - fprintf(stderr, " Opt : \"%s\" %ld\n",opt_name,cl->cl_until); + fprintf(stderr, " Opt : \"%s\" %ld\n", opt_name, + (long int)cl->cl_until); } else if(strcmp(opt_name, "m")==0 || strcmp(opt_name, "mail")==0){ @@ -1057,7 +1059,7 @@ read_freq(char *ptr, CF *cf) set_freq(cl->cl_option); /* then cl_timefreq */ - if ( (ptr = get_time(ptr, &(cl->cl_timefreq))) == NULL) { + if ( (ptr = get_time(ptr, (time_t *) &(cl->cl_timefreq))) == NULL) { fprintf(stderr, "%s:%d: Error while reading frequency:" " skipping line.\n", file_name, line); goto exiterr; @@ -1098,7 +1100,7 @@ read_freq(char *ptr, CF *cf) if ( debug_opt ) fprintf(stderr, " Cmd \"%s\", timefreq %ld, first %ld\n", - cl->cl_shell, cl->cl_timefreq, cl->cl_nextexe); + cl->cl_shell, cl->cl_timefreq, (long int)cl->cl_nextexe); return;