Fossil SCM

An unused and an uninitialized variable.

jan.nijtmans 2013-08-27 13:50 trunk
Commit 669f22fb7cc25561633e462cb7f521b0cbeba864
1 file changed +2 -3
+2 -3
--- src/timeline.c
+++ src/timeline.c
@@ -2032,11 +2032,10 @@
20322032
}
20332033
@ </tbody></table>
20342034
if(nEventTotal){
20352035
char const * zAvgLabel = includeMonth ? "month" : "year";
20362036
int nAvg = iterations ? (nEventTotal/iterations) : 0;
2037
- int nWidth = (int)(100 * nAvg / nMaxEvents);
20382037
@ <br><div>Total events: %d(nEventTotal)
20392038
@ <br>Average per active %s(zAvgLabel): %d(nAvg)
20402039
@ </div>
20412040
}
20422041
if( !includeMonth ){
@@ -2120,12 +2119,12 @@
21202119
Stmt qYears = empty_Stmt;
21212120
char * zDefaultYear = NULL;
21222121
Blob sql = empty_blob;
21232122
int nMaxEvents = 1; /* max number of events for
21242123
all rows. */
2125
- int iterations; /* # of active time periods. */
2126
-
2124
+ int iterations = 0; /* # of active time periods. */
2125
+
21272126
cgi_printf("Select year: ");
21282127
blob_append(&sql,
21292128
"SELECT DISTINCT substr(date(mtime),1,4) AS y "
21302129
"FROM event WHERE 1 ", -1);
21312130
if(zUserName&&*zUserName){
21322131
--- src/timeline.c
+++ src/timeline.c
@@ -2032,11 +2032,10 @@
2032 }
2033 @ </tbody></table>
2034 if(nEventTotal){
2035 char const * zAvgLabel = includeMonth ? "month" : "year";
2036 int nAvg = iterations ? (nEventTotal/iterations) : 0;
2037 int nWidth = (int)(100 * nAvg / nMaxEvents);
2038 @ <br><div>Total events: %d(nEventTotal)
2039 @ <br>Average per active %s(zAvgLabel): %d(nAvg)
2040 @ </div>
2041 }
2042 if( !includeMonth ){
@@ -2120,12 +2119,12 @@
2120 Stmt qYears = empty_Stmt;
2121 char * zDefaultYear = NULL;
2122 Blob sql = empty_blob;
2123 int nMaxEvents = 1; /* max number of events for
2124 all rows. */
2125 int iterations; /* # of active time periods. */
2126
2127 cgi_printf("Select year: ");
2128 blob_append(&sql,
2129 "SELECT DISTINCT substr(date(mtime),1,4) AS y "
2130 "FROM event WHERE 1 ", -1);
2131 if(zUserName&&*zUserName){
2132
--- src/timeline.c
+++ src/timeline.c
@@ -2032,11 +2032,10 @@
2032 }
2033 @ </tbody></table>
2034 if(nEventTotal){
2035 char const * zAvgLabel = includeMonth ? "month" : "year";
2036 int nAvg = iterations ? (nEventTotal/iterations) : 0;
 
2037 @ <br><div>Total events: %d(nEventTotal)
2038 @ <br>Average per active %s(zAvgLabel): %d(nAvg)
2039 @ </div>
2040 }
2041 if( !includeMonth ){
@@ -2120,12 +2119,12 @@
2119 Stmt qYears = empty_Stmt;
2120 char * zDefaultYear = NULL;
2121 Blob sql = empty_blob;
2122 int nMaxEvents = 1; /* max number of events for
2123 all rows. */
2124 int iterations = 0; /* # of active time periods. */
2125
2126 cgi_printf("Select year: ");
2127 blob_append(&sql,
2128 "SELECT DISTINCT substr(date(mtime),1,4) AS y "
2129 "FROM event WHERE 1 ", -1);
2130 if(zUserName&&*zUserName){
2131

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button