Mercurial > vim
diff src/message.c @ 27018:268f6a3511df v8.2.4038
patch 8.2.4038: various code not used when features are disabled
Commit: https://github.com/vim/vim/commit/748b308eebe8d8860888eb27da08333f175d547d
Author: Dominique Pelle <dominique.pelle@gmail.com>
Date: Sat Jan 8 12:41:16 2022 +0000
patch 8.2.4038: various code not used when features are disabled
Problem: Various code not used when features are disabled.
Solution: Add #ifdefs. (Dominique Pell?, closes https://github.com/vim/vim/issues/9491)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 08 Jan 2022 13:45:04 +0100 |
parents | d4e61d61afd9 |
children | eebbcc83fb75 |
line wrap: on
line diff
--- a/src/message.c +++ b/src/message.c @@ -876,6 +876,7 @@ internal_error(char *where) siemsg(_(e_internal_error_str), where); } +#if defined(FEAT_EVAL) || defined(PROTO) /* * Like internal_error() but do not call abort(), to avoid tests using * test_unknown() and test_void() causing Vim to exit. @@ -885,6 +886,7 @@ internal_error_no_abort(char *where) { semsg(_(e_internal_error_str), where); } +#endif // emsg3() and emsgn() are in misc2.c to avoid warnings for the prototypes. @@ -894,6 +896,7 @@ emsg_invreg(int name) semsg(_(e_invalid_register_name_str), transchar(name)); } +#if defined(FEAT_EVAL) || defined(PROTO) /* * Give an error message which contains %s for "name[len]". */ @@ -905,6 +908,7 @@ emsg_namelen(char *msg, char_u *name, in semsg(msg, copy == NULL ? "NULL" : (char *)copy); vim_free(copy); } +#endif /* * Like msg(), but truncate to a single line if p_shm contains 't', or when