From: Frederic Marchal Date: Thu, 30 May 2013 09:00:05 +0000 (+0200) Subject: Fix some compiler warnings X-Git-Tag: v2.3.7~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=902f8047f812246e5bdc564f5ffaaa4eacbda8ee;p=thirdparty%2Fsarg.git Fix some compiler warnings Uninitialized variable and unused variable. --- diff --git a/grepday.c b/grepday.c index 4f96702..b0d8908 100644 --- a/grepday.c +++ b/grepday.c @@ -290,7 +290,6 @@ static int greport_compute_yaxis(struct PlotStruct *pdata,struct GraphDataStruct double symin,symax; double range; double yscale; - double ymag; if (pdata->ymin<0.) { debuga(_("Minimum for Y scale of the graph is out of range: %"PRId64"\n"),(int64_t)pdata->ymin); @@ -306,7 +305,6 @@ static int greport_compute_yaxis(struct PlotStruct *pdata,struct GraphDataStruct case PTG_LinBin: symin=(double)pdata->ymin; symax=(double)pdata->ymax; - ymag=1000.; break; case PTG_LogBin: @@ -315,13 +313,11 @@ static int greport_compute_yaxis(struct PlotStruct *pdata,struct GraphDataStruct else symin=0.; symax=log(pdata->ymax); - ymag=1000.; break; case PTG_Time: symin=(double)pdata->ymin; symax=(double)pdata->ymax; - ymag=1.; break; default: @@ -665,7 +661,6 @@ void greport_day(const struct userinfostruct *uinfo) FILE *fp_in, *fp_ou; char wdirname[MAXLEN]; char buf[MAXLEN]; - char colsep; int day; long long int llday; long long int bytes; @@ -709,7 +704,6 @@ void greport_day(const struct userinfostruct *uinfo) exit(EXIT_FAILURE); } if ((datetimeby & DATETIME_BYTE)!=0) { - colsep=((datetimeby & DATETIME_ELAP)!=0) ? '\t' : '\0'; if (getword_atoll(&bytes,&gwarea,'\t')<0) { debuga(_("Invalid number of bytes in file %s\n"),wdirname); exit(EXIT_FAILURE); diff --git a/url.c b/url.c index b70c2f9..df86d22 100644 --- a/url.c +++ b/url.c @@ -538,7 +538,7 @@ static int Alias_Store(char *buf) unsigned short int ipv6[8]; int nbits; const char *next; - int Error; + int Error=-10;//compiler pacifier: uninitialized variable if (strncasecmp(buf,"re:",3)==0) { #ifdef USE_PCRE