fix for gcc2 (variable definitions in beginning)

This commit is contained in:
pvalchev 2005-12-18 20:45:41 +00:00
parent de16e745c3
commit e526e362f9
2 changed files with 37 additions and 6 deletions

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-src_cfetool_c,v 1.1 2005/10/27 21:47:28 sturm Exp $
--- src/cfetool.c.orig Thu Jun 30 03:53:06 2005
+++ src/cfetool.c Fri Oct 21 16:35:55 2005
$OpenBSD: patch-src_cfetool_c,v 1.2 2005/12/18 20:45:41 pvalchev Exp $
--- src/cfetool.c.orig Thu Jun 30 01:53:06 2005
+++ src/cfetool.c Sun Dec 18 11:58:21 2005
@@ -326,7 +326,7 @@ void parse_create_opts(int argc, char **
case 'f':
@ -439,6 +439,17 @@ $OpenBSD: patch-src_cfetool_c,v 1.1 2005/10/27 21:47:28 sturm Exp $
AppendItem(classlist,var,"");
}
@@ -2646,9 +2646,9 @@ void DoBatch(int dbtype)
double val=0;
float val1=0, val2=0, val3=0, val4=0, val5=0, val6=0, val7=0, val8=0, val9=0, val10=0;
int i = 0, j = 0, n = 0, y = 0, k = 0, w = 0;
- time_to_update = false;
int timeint = -1;
struct Average av;
+ time_to_update = false;
Verbose("Batch mode\n");
@@ -2762,11 +2762,11 @@ void DoBatch(int dbtype)
} else {
update_time = (time_t) timeint;

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-src_cfetoolgraph_c,v 1.1 2005/10/27 21:47:28 sturm Exp $
--- src/cfetoolgraph.c.orig Thu Jun 30 03:53:06 2005
+++ src/cfetoolgraph.c Fri Oct 21 16:35:55 2005
$OpenBSD: patch-src_cfetoolgraph_c,v 1.2 2005/12/18 20:45:41 pvalchev Exp $
--- src/cfetoolgraph.c.orig Thu Jun 30 01:53:06 2005
+++ src/cfetoolgraph.c Sun Dec 18 12:41:13 2005
@@ -138,7 +138,7 @@ int main(int argc, char **argv)
break;
@ -101,6 +101,26 @@ $OpenBSD: patch-src_cfetoolgraph_c,v 1.1 2005/10/27 21:47:28 sturm Exp $
key.data = TIMEKEY;
key.size = strlen(TIMEKEY) + 1;
@@ -542,6 +542,9 @@ void WriteGraphFiles(int dbtype)
void WriteHistogram(int dbtype)
{
int numdays=0;
+ int position, day;
+ int weekly[CF_GRAINS];
+
/* Finally, look at the histogram */
printf("Writing histogram file now!\n");
@@ -554,9 +557,6 @@ void WriteHistogram(int dbtype)
}
}
- int position, day;
- int weekly[CF_GRAINS];
-
switch(dbtype)
{
case DAILY:
@@ -628,7 +628,7 @@ void WriteHistogram(int dbtype)
}
}