diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/ex_getln.c | 3 | ||||
-rw-r--r-- | src/nvim/undo.c | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index ed408c28e5..a0910f1394 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -4327,7 +4327,8 @@ void ExpandEscape(expand_T *xp, char_u *str, int numfiles, char_u **files, int o /// if true then it escapes for a shell command. /// /// @return [allocated] escaped file name. -char *vim_strsave_fnameescape(const char *const fname, const bool shell) +char *vim_strsave_fnameescape(const char *const fname, + const bool shell FUNC_ATTR_UNUSED) FUNC_ATTR_NONNULL_RET FUNC_ATTR_MALLOC FUNC_ATTR_NONNULL_ALL { #ifdef BACKSLASH_IN_FILENAME diff --git a/src/nvim/undo.c b/src/nvim/undo.c index a8b8f7aa50..636d00bbbf 100644 --- a/src/nvim/undo.c +++ b/src/nvim/undo.c @@ -1255,7 +1255,8 @@ theend: /// a bit more verbose. /// Otherwise use curbuf->b_ffname to generate the undo file name. /// "hash[UNDO_HASH_SIZE]" must be the hash value of the buffer text. -void u_read_undo(char *name, char_u *hash, char_u *orig_name) +void u_read_undo(char *name, const char_u *hash, + const char_u *orig_name FUNC_ATTR_UNUSED) FUNC_ATTR_NONNULL_ARG(2) { u_header_T **uhp_table = NULL; @@ -1273,7 +1274,7 @@ void u_read_undo(char *name, char_u *hash, char_u *orig_name) // owner of the text file or equal to the current user. FileInfo file_info_orig; FileInfo file_info_undo; - if (os_fileinfo((char *)orig_name, &file_info_orig) + if (os_fileinfo((const char *)orig_name, &file_info_orig) && os_fileinfo((char *)file_name, &file_info_undo) && file_info_orig.stat.st_uid != file_info_undo.stat.st_uid && file_info_undo.stat.st_uid != getuid()) { |