mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
remove unused parameter from buf_store_file_info
This commit is contained in:
parent
1a3ee71de2
commit
6ec5457308
@ -442,7 +442,7 @@ readfile (
|
|||||||
/* Remember time of file. */
|
/* Remember time of file. */
|
||||||
FileInfo file_info;
|
FileInfo file_info;
|
||||||
if (os_get_file_info((char *)fname, &file_info)) {
|
if (os_get_file_info((char *)fname, &file_info)) {
|
||||||
buf_store_file_info(curbuf, &file_info, fname);
|
buf_store_file_info(curbuf, &file_info);
|
||||||
curbuf->b_mtime_read = curbuf->b_mtime;
|
curbuf->b_mtime_read = curbuf->b_mtime;
|
||||||
#ifdef UNIX
|
#ifdef UNIX
|
||||||
/*
|
/*
|
||||||
@ -3954,7 +3954,7 @@ nofail:
|
|||||||
/* Update the timestamp to avoid an "overwrite changed file"
|
/* Update the timestamp to avoid an "overwrite changed file"
|
||||||
* prompt when writing again. */
|
* prompt when writing again. */
|
||||||
if (os_get_file_info((char *)fname, &file_info_old)) {
|
if (os_get_file_info((char *)fname, &file_info_old)) {
|
||||||
buf_store_file_info(buf, &file_info_old, fname);
|
buf_store_file_info(buf, &file_info_old);
|
||||||
buf->b_mtime_read = buf->b_mtime;
|
buf->b_mtime_read = buf->b_mtime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5116,7 +5116,7 @@ buf_check_timestamp (
|
|||||||
buf->b_orig_size = 0;
|
buf->b_orig_size = 0;
|
||||||
buf->b_orig_mode = 0;
|
buf->b_orig_mode = 0;
|
||||||
} else {
|
} else {
|
||||||
buf_store_file_info(buf, &file_info, buf->b_ffname);
|
buf_store_file_info(buf, &file_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Don't do anything for a directory. Might contain the file
|
/* Don't do anything for a directory. Might contain the file
|
||||||
@ -5418,8 +5418,7 @@ void buf_reload(buf_T *buf, int orig_mode)
|
|||||||
/* Careful: autocommands may have made "buf" invalid! */
|
/* Careful: autocommands may have made "buf" invalid! */
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO(stefan991): remove unused parameter fname
|
void buf_store_file_info(buf_T *buf, FileInfo *file_info)
|
||||||
void buf_store_file_info(buf_T *buf, FileInfo *file_info, char_u *fname)
|
|
||||||
{
|
{
|
||||||
buf->b_mtime = (long)file_info->stat.st_mtim.tv_sec;
|
buf->b_mtime = (long)file_info->stat.st_mtim.tv_sec;
|
||||||
buf->b_orig_size = file_info->stat.st_size;
|
buf->b_orig_size = file_info->stat.st_size;
|
||||||
|
@ -41,7 +41,7 @@ int vim_rename(char_u *from, char_u *to);
|
|||||||
int check_timestamps(int focus);
|
int check_timestamps(int focus);
|
||||||
int buf_check_timestamp(buf_T *buf, int focus);
|
int buf_check_timestamp(buf_T *buf, int focus);
|
||||||
void buf_reload(buf_T *buf, int orig_mode);
|
void buf_reload(buf_T *buf, int orig_mode);
|
||||||
void buf_store_file_info(buf_T *buf, FileInfo *file_info, char_u *fname);
|
void buf_store_file_info(buf_T *buf, FileInfo *file_info);
|
||||||
void write_lnum_adjust(linenr_T offset);
|
void write_lnum_adjust(linenr_T offset);
|
||||||
void vim_deltempdir(void);
|
void vim_deltempdir(void);
|
||||||
char_u *vim_tempname(int extra_char);
|
char_u *vim_tempname(int extra_char);
|
||||||
|
@ -865,7 +865,7 @@ static void set_b0_fname(ZERO_BL *b0p, buf_T *buf)
|
|||||||
#ifdef CHECK_INODE
|
#ifdef CHECK_INODE
|
||||||
long_to_char((long)file_info.stat.st_ino, b0p->b0_ino);
|
long_to_char((long)file_info.stat.st_ino, b0p->b0_ino);
|
||||||
#endif
|
#endif
|
||||||
buf_store_file_info(buf, &file_info, buf->b_ffname);
|
buf_store_file_info(buf, &file_info);
|
||||||
buf->b_mtime_read = buf->b_mtime;
|
buf->b_mtime_read = buf->b_mtime;
|
||||||
} else {
|
} else {
|
||||||
long_to_char(0L, b0p->b0_mtime);
|
long_to_char(0L, b0p->b0_mtime);
|
||||||
|
Loading…
Reference in New Issue
Block a user