Fossil SCM

Fix (harmless) mingw compiler warning src/vfile.c: variables ‘currentPerm’ and ‘origPerm’ set but not used [-Wunused-but-set-variable]

jan.nijtmans 2016-04-28 14:32 trunk
Commit c2000668555aeef23de17932ae1e6da006dd091c
1 file changed +4
--- src/vfile.c
+++ src/vfile.c
@@ -187,12 +187,14 @@
187187
while( db_step(&q)==SQLITE_ROW ){
188188
int id, rid, isDeleted;
189189
const char *zName;
190190
int chnged = 0;
191191
int oldChnged;
192
+#ifndef _WIN32
192193
int origPerm;
193194
int currentPerm;
195
+#endif
194196
i64 oldMtime;
195197
i64 currentMtime;
196198
i64 origSize;
197199
i64 currentSize;
198200
@@ -203,12 +205,14 @@
203205
oldChnged = chnged = db_column_int(&q, 4);
204206
oldMtime = db_column_int64(&q, 7);
205207
origSize = db_column_int64(&q, 6);
206208
currentSize = file_wd_size(zName);
207209
currentMtime = file_wd_mtime(0);
210
+#ifndef _WIN32
208211
origPerm = db_column_int(&q, 8);
209212
currentPerm = file_wd_perm(zName);
213
+#endif
210214
if( chnged==0 && (isDeleted || rid==0) ){
211215
/* "fossil rm" or "fossil add" always change the file */
212216
chnged = 1;
213217
}else if( !file_wd_isfile_or_link(0) && currentSize>=0 ){
214218
if( cksigFlags & CKSIG_ENOTFILE ){
215219
--- 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

Keyboard Shortcuts

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