refactor: make error message definitions const

message.c functions now take const char * as a format. Error message
definitions can be made const.
This commit is contained in:
ii14
2023-04-05 21:13:53 +02:00
committed by GitHub
parent 2612930a09
commit 371823d407
37 changed files with 376 additions and 372 deletions

View File

@@ -50,8 +50,8 @@
#define DICT_MAXNEST 100 // maximum nesting of lists and dicts
static char *e_letunexp = N_("E18: Unexpected characters in :let");
static char *e_lock_unlock = N_("E940: Cannot lock or unlock variable %s");
static const char *e_letunexp = N_("E18: Unexpected characters in :let");
static const char *e_lock_unlock = N_("E940: Cannot lock or unlock variable %s");
/// Get a list of lines from a HERE document. The here document is a list of
/// lines surrounded by a marker.
@@ -693,7 +693,7 @@ static char *ex_let_one(char *arg, typval_T *const tv, const bool copy, const bo
if (!failed) {
if (opt_type != gov_string || s != NULL) {
char *err = set_option_value(arg, (long)n, s, scope);
const char *err = set_option_value(arg, (long)n, s, scope);
arg_end = p;
if (err != NULL) {
emsg(_(err));