]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Fix some compiler warnings
authorFrederic Marchal <fmarchal@users.sourceforge.net>
Thu, 30 May 2013 09:00:05 +0000 (11:00 +0200)
committerFrederic Marchal <fmarchal@users.sourceforge.net>
Thu, 30 May 2013 09:00:05 +0000 (11:00 +0200)
Uninitialized variable and unused variable.

grepday.c
url.c

index 4f96702002a0b8b73f08109081afa87913dd7699..b0d89087d61addf69bc613cf02445a51a6b67bf3 100644 (file)
--- 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 b70c2f98438df165e7646b20e29c875f4a626d6f..df86d22957af5f23526383ba2e15ada1a47dd994 100644 (file)
--- 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