mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
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
This commit is contained in:
parent
bc385a150f
commit
7f29122c8c
10
src/fileio.c
10
src/fileio.c
@ -149,9 +149,9 @@ readfile(
|
|||||||
char_u *p;
|
char_u *p;
|
||||||
off_T filesize = 0;
|
off_T filesize = 0;
|
||||||
int skip_read = FALSE;
|
int skip_read = FALSE;
|
||||||
|
#ifdef FEAT_CRYPT
|
||||||
off_T filesize_disk = 0; // file size read from disk
|
off_T filesize_disk = 0; // file size read from disk
|
||||||
off_T filesize_count = 0; // counter
|
off_T filesize_count = 0; // counter
|
||||||
#ifdef FEAT_CRYPT
|
|
||||||
char_u *cryptkey = NULL;
|
char_u *cryptkey = NULL;
|
||||||
int did_ask_for_key = FALSE;
|
int did_ask_for_key = FALSE;
|
||||||
#endif
|
#endif
|
||||||
@ -425,7 +425,9 @@ readfile(
|
|||||||
buf_store_time(curbuf, &st, fname);
|
buf_store_time(curbuf, &st, fname);
|
||||||
curbuf->b_mtime_read = curbuf->b_mtime;
|
curbuf->b_mtime_read = curbuf->b_mtime;
|
||||||
curbuf->b_mtime_read_ns = curbuf->b_mtime_ns;
|
curbuf->b_mtime_read_ns = curbuf->b_mtime_ns;
|
||||||
|
#ifdef FEAT_CRYPT
|
||||||
filesize_disk = st.st_size;
|
filesize_disk = st.st_size;
|
||||||
|
#endif
|
||||||
#ifdef UNIX
|
#ifdef UNIX
|
||||||
/*
|
/*
|
||||||
* Use the protection bits of the original file for the swap file.
|
* Use the protection bits of the original file for the swap file.
|
||||||
@ -1106,7 +1108,9 @@ retry:
|
|||||||
{
|
{
|
||||||
linerest = 0;
|
linerest = 0;
|
||||||
filesize = 0;
|
filesize = 0;
|
||||||
|
#ifdef FEAT_CRYPT
|
||||||
filesize_count = 0;
|
filesize_count = 0;
|
||||||
|
#endif
|
||||||
skip_count = lines_to_skip;
|
skip_count = lines_to_skip;
|
||||||
read_count = lines_to_read;
|
read_count = lines_to_read;
|
||||||
conv_restlen = 0;
|
conv_restlen = 0;
|
||||||
@ -1333,9 +1337,9 @@ retry:
|
|||||||
#endif
|
#endif
|
||||||
long read_size = size;
|
long read_size = size;
|
||||||
size = read_eintr(fd, ptr, read_size);
|
size = read_eintr(fd, ptr, read_size);
|
||||||
filesize_count += size;
|
|
||||||
#ifdef FEAT_CRYPT
|
#ifdef FEAT_CRYPT
|
||||||
// hit end of file
|
// Did we reach end of file?
|
||||||
|
filesize_count += size;
|
||||||
eof = (size < read_size || filesize_count == filesize_disk);
|
eof = (size < read_size || filesize_count == filesize_disk);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -695,6 +695,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1640,
|
||||||
/**/
|
/**/
|
||||||
1639,
|
1639,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user