diff options
author | James McCoy <jamessan@jamessan.com> | 2021-10-23 16:04:37 -0400 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2021-11-01 06:41:29 -0400 |
commit | e6ff154be6da8bd53b604fb6e38686acae75b24f (patch) | |
tree | 8424fa376151d9eabfe5a23c54f19ec4e22ba7ea /src/nvim/fileio.c | |
parent | efa924f66b183d9cf2404ce91c4f009c27e0515a (diff) | |
download | rneovim-e6ff154be6da8bd53b604fb6e38686acae75b24f.tar.gz rneovim-e6ff154be6da8bd53b604fb6e38686acae75b24f.tar.bz2 rneovim-e6ff154be6da8bd53b604fb6e38686acae75b24f.zip |
vim-patch:8.1.0779: argument for message functions is inconsistent
Problem: Argument for message functions is inconsistent.
Solution: Make first argument to msg() "char *".
https://github.com/vim/vim/commit/32526b3c1846025f0e655f41efd4e5428da16b6c
Diffstat (limited to 'src/nvim/fileio.c')
-rw-r--r-- | src/nvim/fileio.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index d499815ea6..cf4037308b 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -1847,7 +1847,7 @@ failed: msg_scrolled_ign = true; if (!read_stdin && !read_buffer) { - p = msg_trunc_attr(IObuff, FALSE, 0); + p = (char_u *)msg_trunc_attr((char *)IObuff, FALSE, 0); } if (read_stdin || read_buffer || restart_edit != 0 @@ -2109,27 +2109,27 @@ static char_u *next_fenc(char_u **pp, bool *alloced) static char_u *readfile_charconvert(char_u *fname, char_u *fenc, int *fdp) { char_u *tmpname; - char_u *errmsg = NULL; + char *errmsg = NULL; tmpname = vim_tempname(); if (tmpname == NULL) { - errmsg = (char_u *)_("Can't find temp file for conversion"); + errmsg = _("Can't find temp file for conversion"); } else { close(*fdp); // close the input file, ignore errors *fdp = -1; if (eval_charconvert((char *)fenc, "utf-8", (char *)fname, (char *)tmpname) == FAIL) { - errmsg = (char_u *)_("Conversion with 'charconvert' failed"); + errmsg = _("Conversion with 'charconvert' failed"); } if (errmsg == NULL && (*fdp = os_open((char *)tmpname, O_RDONLY, 0)) < 0) { - errmsg = (char_u *)_("can't read output of 'charconvert'"); + errmsg = _("can't read output of 'charconvert'"); } } if (errmsg != NULL) { // Don't use emsg(), it breaks mappings, the retry with // another type of conversion might still work. - MSG(errmsg); + msg(errmsg); if (tmpname != NULL) { os_remove((char *)tmpname); // delete converted file XFREE_CLEAR(tmpname); @@ -3471,7 +3471,7 @@ restore_backup: // This may take a while, if we were interrupted let the user // know we got the message. if (got_int) { - MSG(_(e_interr)); + msg(_(e_interr)); ui_flush(); } @@ -3536,7 +3536,7 @@ restore_backup: } } - set_keep_msg(msg_trunc_attr(IObuff, FALSE, 0), 0); + set_keep_msg((char_u *)msg_trunc_attr((char *)IObuff, FALSE, 0), 0); } /* When written everything correctly: reset 'modified'. Unless not @@ -3676,9 +3676,9 @@ nofail: retval = FAIL; if (end == 0) { const int attr = HL_ATTR(HLF_E); // Set highlight for error messages. - MSG_PUTS_ATTR(_("\nWARNING: Original file may be lost or damaged\n"), + msg_puts_attr(_("\nWARNING: Original file may be lost or damaged\n"), attr | MSG_HIST); - MSG_PUTS_ATTR(_("don't quit the editor until the file is successfully written!"), + msg_puts_attr(_("don't quit the editor until the file is successfully written!"), attr | MSG_HIST); /* Update the timestamp to avoid an "overwrite changed file" |