Fossil SCM
Fix (harmless) mingw compiler warning src/vfile.c: variables ‘currentPerm’ and ‘origPerm’ set but not used [-Wunused-but-set-variable]
Commit
c2000668555aeef23de17932ae1e6da006dd091c
Parent
980fdda64b30a1d…
1 file changed
+4
+4
| --- src/vfile.c | ||
| +++ src/vfile.c | ||
| @@ -187,12 +187,14 @@ | ||
| 187 | 187 | while( db_step(&q)==SQLITE_ROW ){ |
| 188 | 188 | int id, rid, isDeleted; |
| 189 | 189 | const char *zName; |
| 190 | 190 | int chnged = 0; |
| 191 | 191 | int oldChnged; |
| 192 | +#ifndef _WIN32 | |
| 192 | 193 | int origPerm; |
| 193 | 194 | int currentPerm; |
| 195 | +#endif | |
| 194 | 196 | i64 oldMtime; |
| 195 | 197 | i64 currentMtime; |
| 196 | 198 | i64 origSize; |
| 197 | 199 | i64 currentSize; |
| 198 | 200 | |
| @@ -203,12 +205,14 @@ | ||
| 203 | 205 | oldChnged = chnged = db_column_int(&q, 4); |
| 204 | 206 | oldMtime = db_column_int64(&q, 7); |
| 205 | 207 | origSize = db_column_int64(&q, 6); |
| 206 | 208 | currentSize = file_wd_size(zName); |
| 207 | 209 | currentMtime = file_wd_mtime(0); |
| 210 | +#ifndef _WIN32 | |
| 208 | 211 | origPerm = db_column_int(&q, 8); |
| 209 | 212 | currentPerm = file_wd_perm(zName); |
| 213 | +#endif | |
| 210 | 214 | if( chnged==0 && (isDeleted || rid==0) ){ |
| 211 | 215 | /* "fossil rm" or "fossil add" always change the file */ |
| 212 | 216 | chnged = 1; |
| 213 | 217 | }else if( !file_wd_isfile_or_link(0) && currentSize>=0 ){ |
| 214 | 218 | if( cksigFlags & CKSIG_ENOTFILE ){ |
| 215 | 219 |
| --- src/vfile.c | |
| +++ src/vfile.c | |
| @@ -187,12 +187,14 @@ | |
| 187 | while( db_step(&q)==SQLITE_ROW ){ |
| 188 | int id, rid, isDeleted; |
| 189 | const char *zName; |
| 190 | int chnged = 0; |
| 191 | int oldChnged; |
| 192 | int origPerm; |
| 193 | int currentPerm; |
| 194 | i64 oldMtime; |
| 195 | i64 currentMtime; |
| 196 | i64 origSize; |
| 197 | i64 currentSize; |
| 198 | |
| @@ -203,12 +205,14 @@ | |
| 203 | oldChnged = chnged = db_column_int(&q, 4); |
| 204 | oldMtime = db_column_int64(&q, 7); |
| 205 | origSize = db_column_int64(&q, 6); |
| 206 | currentSize = file_wd_size(zName); |
| 207 | currentMtime = file_wd_mtime(0); |
| 208 | origPerm = db_column_int(&q, 8); |
| 209 | currentPerm = file_wd_perm(zName); |
| 210 | if( chnged==0 && (isDeleted || rid==0) ){ |
| 211 | /* "fossil rm" or "fossil add" always change the file */ |
| 212 | chnged = 1; |
| 213 | }else if( !file_wd_isfile_or_link(0) && currentSize>=0 ){ |
| 214 | if( cksigFlags & CKSIG_ENOTFILE ){ |
| 215 |
| --- src/vfile.c | |
| +++ src/vfile.c | |
| @@ -187,12 +187,14 @@ | |
| 187 | while( db_step(&q)==SQLITE_ROW ){ |
| 188 | int id, rid, isDeleted; |
| 189 | const char *zName; |
| 190 | int chnged = 0; |
| 191 | int oldChnged; |
| 192 | #ifndef _WIN32 |
| 193 | int origPerm; |
| 194 | int currentPerm; |
| 195 | #endif |
| 196 | i64 oldMtime; |
| 197 | i64 currentMtime; |
| 198 | i64 origSize; |
| 199 | i64 currentSize; |
| 200 | |
| @@ -203,12 +205,14 @@ | |
| 205 | oldChnged = chnged = db_column_int(&q, 4); |
| 206 | oldMtime = db_column_int64(&q, 7); |
| 207 | origSize = db_column_int64(&q, 6); |
| 208 | currentSize = file_wd_size(zName); |
| 209 | currentMtime = file_wd_mtime(0); |
| 210 | #ifndef _WIN32 |
| 211 | origPerm = db_column_int(&q, 8); |
| 212 | currentPerm = file_wd_perm(zName); |
| 213 | #endif |
| 214 | if( chnged==0 && (isDeleted || rid==0) ){ |
| 215 | /* "fossil rm" or "fossil add" always change the file */ |
| 216 | chnged = 1; |
| 217 | }else if( !file_wd_isfile_or_link(0) && currentSize>=0 ){ |
| 218 | if( cksigFlags & CKSIG_ENOTFILE ){ |
| 219 |