Fossil SCM
An unused and an uninitialized variable.
Commit
669f22fb7cc25561633e462cb7f521b0cbeba864
Parent
d5649979ed10dd7…
1 file changed
+2
-3
+2
-3
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -2032,11 +2032,10 @@ | ||
| 2032 | 2032 | } |
| 2033 | 2033 | @ </tbody></table> |
| 2034 | 2034 | if(nEventTotal){ |
| 2035 | 2035 | char const * zAvgLabel = includeMonth ? "month" : "year"; |
| 2036 | 2036 | int nAvg = iterations ? (nEventTotal/iterations) : 0; |
| 2037 | - int nWidth = (int)(100 * nAvg / nMaxEvents); | |
| 2038 | 2037 | @ <br><div>Total events: %d(nEventTotal) |
| 2039 | 2038 | @ <br>Average per active %s(zAvgLabel): %d(nAvg) |
| 2040 | 2039 | @ </div> |
| 2041 | 2040 | } |
| 2042 | 2041 | if( !includeMonth ){ |
| @@ -2120,12 +2119,12 @@ | ||
| 2120 | 2119 | Stmt qYears = empty_Stmt; |
| 2121 | 2120 | char * zDefaultYear = NULL; |
| 2122 | 2121 | Blob sql = empty_blob; |
| 2123 | 2122 | int nMaxEvents = 1; /* max number of events for |
| 2124 | 2123 | all rows. */ |
| 2125 | - int iterations; /* # of active time periods. */ | |
| 2126 | - | |
| 2124 | + int iterations = 0; /* # of active time periods. */ | |
| 2125 | + | |
| 2127 | 2126 | cgi_printf("Select year: "); |
| 2128 | 2127 | blob_append(&sql, |
| 2129 | 2128 | "SELECT DISTINCT substr(date(mtime),1,4) AS y " |
| 2130 | 2129 | "FROM event WHERE 1 ", -1); |
| 2131 | 2130 | if(zUserName&&*zUserName){ |
| 2132 | 2131 |
| --- 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 |