Fossil

Check-in [c2000668]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix (harmless) mingw compiler warning src/vfile.c: variables ‘currentPerm’ and ‘origPerm’ set but not used [-Wunused-but-set-variable]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c2000668555aeef23de17932ae1e6da006dd091c
User & Date: jan.nijtmans 2016-04-28 14:32:51
Context
2016-04-29
08:28
Make option --baseurl work on Windows check-in: 6f35075a user: jan.nijtmans tags: trunk
2016-04-28
14:32
Fix (harmless) mingw compiler warning src/vfile.c: variables ‘currentPerm’ and ‘origPerm’ set but not used [-Wunused-but-set-variable] check-in: c2000668 user: jan.nijtmans tags: trunk
2016-04-25
04:13
Make the glob pattern for encrypted repositories a bit more strict. check-in: 980fdda6 user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vfile.c.

185
186
187
188
189
190
191

192
193

194
195
196
197
198
199
200
...
201
202
203
204
205
206
207

208
209

210
211
212
213
214
215
216
                 " WHERE vid=%d ", g.zLocalRoot, PERM_EXE, PERM_LNK, PERM_REG,
                 vid);
  while( db_step(&q)==SQLITE_ROW ){
    int id, rid, isDeleted;
    const char *zName;
    int chnged = 0;
    int oldChnged;

    int origPerm;
    int currentPerm;

    i64 oldMtime;
    i64 currentMtime;
    i64 origSize;
    i64 currentSize;

    id = db_column_int(&q, 0);
    zName = db_column_text(&q, 1);
................................................................................
    rid = db_column_int(&q, 2);
    isDeleted = db_column_int(&q, 3);
    oldChnged = chnged = db_column_int(&q, 4);
    oldMtime = db_column_int64(&q, 7);
    origSize = db_column_int64(&q, 6);
    currentSize = file_wd_size(zName);
    currentMtime = file_wd_mtime(0);

    origPerm = db_column_int(&q, 8);
    currentPerm = file_wd_perm(zName);

    if( chnged==0 && (isDeleted || rid==0) ){
      /* "fossil rm" or "fossil add" always change the file */
      chnged = 1;
    }else if( !file_wd_isfile_or_link(0) && currentSize>=0 ){
      if( cksigFlags & CKSIG_ENOTFILE ){
        fossil_warning("not an ordinary file: %s", zName);
        nErr++;







>


>







 







>


>







185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
...
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
                 " WHERE vid=%d ", g.zLocalRoot, PERM_EXE, PERM_LNK, PERM_REG,
                 vid);
  while( db_step(&q)==SQLITE_ROW ){
    int id, rid, isDeleted;
    const char *zName;
    int chnged = 0;
    int oldChnged;
#ifndef _WIN32
    int origPerm;
    int currentPerm;
#endif
    i64 oldMtime;
    i64 currentMtime;
    i64 origSize;
    i64 currentSize;

    id = db_column_int(&q, 0);
    zName = db_column_text(&q, 1);
................................................................................
    rid = db_column_int(&q, 2);
    isDeleted = db_column_int(&q, 3);
    oldChnged = chnged = db_column_int(&q, 4);
    oldMtime = db_column_int64(&q, 7);
    origSize = db_column_int64(&q, 6);
    currentSize = file_wd_size(zName);
    currentMtime = file_wd_mtime(0);
#ifndef _WIN32
    origPerm = db_column_int(&q, 8);
    currentPerm = file_wd_perm(zName);
#endif
    if( chnged==0 && (isDeleted || rid==0) ){
      /* "fossil rm" or "fossil add" always change the file */
      chnged = 1;
    }else if( !file_wd_isfile_or_link(0) && currentSize>=0 ){
      if( cksigFlags & CKSIG_ENOTFILE ){
        fossil_warning("not an ordinary file: %s", zName);
        nErr++;