Skip to content

Commit 7f29122

Browse files
committed
patch 9.0.1640: compiler warning for unused variables without crypt feature
Problem: Compiler warning for unused variables without the crypt feature. Solution: Adjust #ifdefs
1 parent bc385a1 commit 7f29122

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/fileio.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ readfile(
149149
char_u *p;
150150
off_T filesize = 0;
151151
int skip_read = FALSE;
152+
#ifdef FEAT_CRYPT
152153
off_T filesize_disk = 0; // file size read from disk
153154
off_T filesize_count = 0; // counter
154-
#ifdef FEAT_CRYPT
155155
char_u *cryptkey = NULL;
156156
int did_ask_for_key = FALSE;
157157
#endif
@@ -425,7 +425,9 @@ readfile(
425425
buf_store_time(curbuf, &st, fname);
426426
curbuf->b_mtime_read = curbuf->b_mtime;
427427
curbuf->b_mtime_read_ns = curbuf->b_mtime_ns;
428+
#ifdef FEAT_CRYPT
428429
filesize_disk = st.st_size;
430+
#endif
429431
#ifdef UNIX
430432
/*
431433
* Use the protection bits of the original file for the swap file.
@@ -1106,7 +1108,9 @@ readfile(
11061108
{
11071109
linerest = 0;
11081110
filesize = 0;
1111+
#ifdef FEAT_CRYPT
11091112
filesize_count = 0;
1113+
#endif
11101114
skip_count = lines_to_skip;
11111115
read_count = lines_to_read;
11121116
conv_restlen = 0;
@@ -1333,9 +1337,9 @@ readfile(
13331337
#endif
13341338
long read_size = size;
13351339
size = read_eintr(fd, ptr, read_size);
1336-
filesize_count += size;
13371340
#ifdef FEAT_CRYPT
1338-
// hit end of file
1341+
// Did we reach end of file?
1342+
filesize_count += size;
13391343
eof = (size < read_size || filesize_count == filesize_disk);
13401344
#endif
13411345
}

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,8 @@ static char *(features[]) =
695695

696696
static int included_patches[] =
697697
{ /* Add new patch number below this line */
698+
/**/
699+
1640,
698700
/**/
699701
1639,
700702
/**/

0 commit comments

Comments
 (0)