To: vim_dev@googlegroups.com Subject: Patch 9.0.1640 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 9.0.1640 (after 9.0.1639) Problem: Compiler warning for unused variables without the crypt feature. Solution: Adjust #ifdefs Files: src/fileio.c *** ../vim-9.0.1639/src/fileio.c 2023-06-17 15:34:58.873252369 +0100 --- src/fileio.c 2023-06-17 16:16:58.135014988 +0100 *************** *** 149,157 **** char_u *p; off_T filesize = 0; int skip_read = FALSE; off_T filesize_disk = 0; // file size read from disk off_T filesize_count = 0; // counter - #ifdef FEAT_CRYPT char_u *cryptkey = NULL; int did_ask_for_key = FALSE; #endif --- 149,157 ---- char_u *p; off_T filesize = 0; int skip_read = FALSE; + #ifdef FEAT_CRYPT off_T filesize_disk = 0; // file size read from disk off_T filesize_count = 0; // counter char_u *cryptkey = NULL; int did_ask_for_key = FALSE; #endif *************** *** 425,431 **** --- 425,433 ---- buf_store_time(curbuf, &st, fname); curbuf->b_mtime_read = curbuf->b_mtime; curbuf->b_mtime_read_ns = curbuf->b_mtime_ns; + #ifdef FEAT_CRYPT filesize_disk = st.st_size; + #endif #ifdef UNIX /* * Use the protection bits of the original file for the swap file. *************** *** 1106,1112 **** --- 1108,1116 ---- { linerest = 0; filesize = 0; + #ifdef FEAT_CRYPT filesize_count = 0; + #endif skip_count = lines_to_skip; read_count = lines_to_read; conv_restlen = 0; *************** *** 1333,1341 **** #endif long read_size = size; size = read_eintr(fd, ptr, read_size); - filesize_count += size; #ifdef FEAT_CRYPT ! // hit end of file eof = (size < read_size || filesize_count == filesize_disk); #endif } --- 1337,1345 ---- #endif long read_size = size; size = read_eintr(fd, ptr, read_size); #ifdef FEAT_CRYPT ! // Did we reach end of file? ! filesize_count += size; eof = (size < read_size || filesize_count == filesize_disk); #endif } *** ../vim-9.0.1639/src/version.c 2023-06-17 15:34:58.873252369 +0100 --- src/version.c 2023-06-17 16:17:45.402972439 +0100 *************** *** 697,698 **** --- 697,700 ---- { /* Add new patch number below this line */ + /**/ + 1640, /**/ -- A computer program does what you tell it to do, not what you want it to do. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///