Fossil SCM
Fix 2 (harmless) compiler warnings about unused variables
Commit
961787df0662be13e849054a66101a3a637e971ba64a812ad8c1ad12c9c77fc2
Parent
37b2eb99917e0b1…
2 files changed
+2
-3
+4
-5
+2
-3
| --- src/etag.c | ||
| +++ src/etag.c | ||
| @@ -138,11 +138,11 @@ | ||
| 138 | 138 | ** Or, if not, it will cause a Last-Modified: header to be included in the |
| 139 | 139 | ** reply. |
| 140 | 140 | */ |
| 141 | 141 | void etag_last_modified(sqlite3_int64 mtime){ |
| 142 | 142 | const char *zIfModifiedSince; |
| 143 | - sqlite3_int64 x, exeMtime; | |
| 143 | + sqlite3_int64 x; | |
| 144 | 144 | assert( iEtagMtime==0 ); /* Only call this routine once */ |
| 145 | 145 | assert( mtime>0 ); /* Only call with a valid mtime */ |
| 146 | 146 | iEtagMtime = mtime; |
| 147 | 147 | |
| 148 | 148 | /* Check to see the If-Modified-Since constraint is satisfied */ |
| @@ -152,12 +152,11 @@ | ||
| 152 | 152 | if( x<=0 || x>mtime ) return; |
| 153 | 153 | |
| 154 | 154 | #if 0 |
| 155 | 155 | /* If the Fossil executable is more recent than If-Modified-Since, |
| 156 | 156 | ** go ahead and regenerate the resource. */ |
| 157 | - exeMtime = file_mtime(g.nameOfExe, ExtFILE); | |
| 158 | - if( exeMtime>x ) return; | |
| 157 | + if( file_mtime(g.nameOfExe, ExtFILE)>x ) return; | |
| 159 | 158 | #endif |
| 160 | 159 | |
| 161 | 160 | /* If we reach this point, it means that the resource has not changed |
| 162 | 161 | ** and that we should generate a 304 Not Modified reply */ |
| 163 | 162 | cgi_reset_content(); |
| 164 | 163 |
| --- src/etag.c | |
| +++ src/etag.c | |
| @@ -138,11 +138,11 @@ | |
| 138 | ** Or, if not, it will cause a Last-Modified: header to be included in the |
| 139 | ** reply. |
| 140 | */ |
| 141 | void etag_last_modified(sqlite3_int64 mtime){ |
| 142 | const char *zIfModifiedSince; |
| 143 | sqlite3_int64 x, exeMtime; |
| 144 | assert( iEtagMtime==0 ); /* Only call this routine once */ |
| 145 | assert( mtime>0 ); /* Only call with a valid mtime */ |
| 146 | iEtagMtime = mtime; |
| 147 | |
| 148 | /* Check to see the If-Modified-Since constraint is satisfied */ |
| @@ -152,12 +152,11 @@ | |
| 152 | if( x<=0 || x>mtime ) return; |
| 153 | |
| 154 | #if 0 |
| 155 | /* If the Fossil executable is more recent than If-Modified-Since, |
| 156 | ** go ahead and regenerate the resource. */ |
| 157 | exeMtime = file_mtime(g.nameOfExe, ExtFILE); |
| 158 | if( exeMtime>x ) return; |
| 159 | #endif |
| 160 | |
| 161 | /* If we reach this point, it means that the resource has not changed |
| 162 | ** and that we should generate a 304 Not Modified reply */ |
| 163 | cgi_reset_content(); |
| 164 |
| --- src/etag.c | |
| +++ src/etag.c | |
| @@ -138,11 +138,11 @@ | |
| 138 | ** Or, if not, it will cause a Last-Modified: header to be included in the |
| 139 | ** reply. |
| 140 | */ |
| 141 | void etag_last_modified(sqlite3_int64 mtime){ |
| 142 | const char *zIfModifiedSince; |
| 143 | sqlite3_int64 x; |
| 144 | assert( iEtagMtime==0 ); /* Only call this routine once */ |
| 145 | assert( mtime>0 ); /* Only call with a valid mtime */ |
| 146 | iEtagMtime = mtime; |
| 147 | |
| 148 | /* Check to see the If-Modified-Since constraint is satisfied */ |
| @@ -152,12 +152,11 @@ | |
| 152 | if( x<=0 || x>mtime ) return; |
| 153 | |
| 154 | #if 0 |
| 155 | /* If the Fossil executable is more recent than If-Modified-Since, |
| 156 | ** go ahead and regenerate the resource. */ |
| 157 | if( file_mtime(g.nameOfExe, ExtFILE)>x ) return; |
| 158 | #endif |
| 159 | |
| 160 | /* If we reach this point, it means that the resource has not changed |
| 161 | ** and that we should generate a 304 Not Modified reply */ |
| 162 | cgi_reset_content(); |
| 163 |
+4
-5
| --- src/export.c | ||
| +++ src/export.c | ||
| @@ -787,11 +787,11 @@ | ||
| 787 | 787 | "CREATE INDEX topolink_child ON topolink(tchild);\n" |
| 788 | 788 | ); |
| 789 | 789 | |
| 790 | 790 | /* Find a timewarp instance */ |
| 791 | 791 | db_prepare(&q1, |
| 792 | - "SELECT P.tid, P.tseq, C.tid, C.tseq\n" | |
| 792 | + "SELECT P.tseq, C.tid, C.tseq\n" | |
| 793 | 793 | " FROM toponode P, toponode C, topolink X\n" |
| 794 | 794 | " WHERE X.tparent=P.tid\n" |
| 795 | 795 | " AND X.tchild=C.tid\n" |
| 796 | 796 | " AND P.tseq>=C.tseq;" |
| 797 | 797 | ); |
| @@ -800,14 +800,13 @@ | ||
| 800 | 800 | db_prepare(&chng, |
| 801 | 801 | "UPDATE toponode SET tseq=:tseq WHERE tid=:tid" |
| 802 | 802 | ); |
| 803 | 803 | |
| 804 | 804 | while( db_step(&q1)==SQLITE_ROW ){ |
| 805 | - int iParent = db_column_int(&q1, 0); | |
| 806 | - i64 iParentTime = db_column_int64(&q1, 1); | |
| 807 | - int iChild = db_column_int(&q1, 2); | |
| 808 | - i64 iChildTime = db_column_int64(&q1, 3); | |
| 805 | + i64 iParentTime = db_column_int64(&q1, 0); | |
| 806 | + int iChild = db_column_int(&q1, 1); | |
| 807 | + i64 iChildTime = db_column_int64(&q1, 2); | |
| 809 | 808 | nChange++; |
| 810 | 809 | if( nChange>10000 ){ |
| 811 | 810 | fossil_fatal("failed to fix all timewarps after 100000 attempts"); |
| 812 | 811 | } |
| 813 | 812 | db_reset(&q1); |
| 814 | 813 |
| --- src/export.c | |
| +++ src/export.c | |
| @@ -787,11 +787,11 @@ | |
| 787 | "CREATE INDEX topolink_child ON topolink(tchild);\n" |
| 788 | ); |
| 789 | |
| 790 | /* Find a timewarp instance */ |
| 791 | db_prepare(&q1, |
| 792 | "SELECT P.tid, P.tseq, C.tid, C.tseq\n" |
| 793 | " FROM toponode P, toponode C, topolink X\n" |
| 794 | " WHERE X.tparent=P.tid\n" |
| 795 | " AND X.tchild=C.tid\n" |
| 796 | " AND P.tseq>=C.tseq;" |
| 797 | ); |
| @@ -800,14 +800,13 @@ | |
| 800 | db_prepare(&chng, |
| 801 | "UPDATE toponode SET tseq=:tseq WHERE tid=:tid" |
| 802 | ); |
| 803 | |
| 804 | while( db_step(&q1)==SQLITE_ROW ){ |
| 805 | int iParent = db_column_int(&q1, 0); |
| 806 | i64 iParentTime = db_column_int64(&q1, 1); |
| 807 | int iChild = db_column_int(&q1, 2); |
| 808 | i64 iChildTime = db_column_int64(&q1, 3); |
| 809 | nChange++; |
| 810 | if( nChange>10000 ){ |
| 811 | fossil_fatal("failed to fix all timewarps after 100000 attempts"); |
| 812 | } |
| 813 | db_reset(&q1); |
| 814 |
| --- src/export.c | |
| +++ src/export.c | |
| @@ -787,11 +787,11 @@ | |
| 787 | "CREATE INDEX topolink_child ON topolink(tchild);\n" |
| 788 | ); |
| 789 | |
| 790 | /* Find a timewarp instance */ |
| 791 | db_prepare(&q1, |
| 792 | "SELECT P.tseq, C.tid, C.tseq\n" |
| 793 | " FROM toponode P, toponode C, topolink X\n" |
| 794 | " WHERE X.tparent=P.tid\n" |
| 795 | " AND X.tchild=C.tid\n" |
| 796 | " AND P.tseq>=C.tseq;" |
| 797 | ); |
| @@ -800,14 +800,13 @@ | |
| 800 | db_prepare(&chng, |
| 801 | "UPDATE toponode SET tseq=:tseq WHERE tid=:tid" |
| 802 | ); |
| 803 | |
| 804 | while( db_step(&q1)==SQLITE_ROW ){ |
| 805 | i64 iParentTime = db_column_int64(&q1, 0); |
| 806 | int iChild = db_column_int(&q1, 1); |
| 807 | i64 iChildTime = db_column_int64(&q1, 2); |
| 808 | nChange++; |
| 809 | if( nChange>10000 ){ |
| 810 | fossil_fatal("failed to fix all timewarps after 100000 attempts"); |
| 811 | } |
| 812 | db_reset(&q1); |
| 813 |