diff options
author | ii14 <59243201+ii14@users.noreply.github.com> | 2023-04-05 21:13:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-05 21:13:53 +0200 |
commit | 371823d407d7d7519735131bcad4670c62a731a7 (patch) | |
tree | b303ffd5d01f6bcb447b0c783de294dd3bac4914 /src/nvim/eval/typval.c | |
parent | 2612930a092736a2f507e06475634346582f8ae1 (diff) | |
download | rneovim-371823d407d7d7519735131bcad4670c62a731a7.tar.gz rneovim-371823d407d7d7519735131bcad4670c62a731a7.tar.bz2 rneovim-371823d407d7d7519735131bcad4670c62a731a7.zip |
refactor: make error message definitions const
message.c functions now take const char * as a format. Error message
definitions can be made const.
Diffstat (limited to 'src/nvim/eval/typval.c')
-rw-r--r-- | src/nvim/eval/typval.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/nvim/eval/typval.c b/src/nvim/eval/typval.c index d077998dae..8e5db64d6a 100644 --- a/src/nvim/eval/typval.c +++ b/src/nvim/eval/typval.c @@ -40,25 +40,25 @@ # include "eval/typval.c.generated.h" #endif -static char e_string_required_for_argument_nr[] +static const char e_string_required_for_argument_nr[] = N_("E1174: String required for argument %d"); -static char e_non_empty_string_required_for_argument_nr[] +static const char e_non_empty_string_required_for_argument_nr[] = N_("E1175: Non-empty string required for argument %d"); -static char e_dict_required_for_argument_nr[] +static const char e_dict_required_for_argument_nr[] = N_("E1206: Dictionary required for argument %d"); -static char e_number_required_for_argument_nr[] +static const char e_number_required_for_argument_nr[] = N_("E1210: Number required for argument %d"); -static char e_list_required_for_argument_nr[] +static const char e_list_required_for_argument_nr[] = N_("E1211: List required for argument %d"); -static char e_string_or_list_required_for_argument_nr[] +static const char e_string_or_list_required_for_argument_nr[] = N_("E1222: String or List required for argument %d"); -static char e_list_or_blob_required_for_argument_nr[] +static const char e_list_or_blob_required_for_argument_nr[] = N_("E1226: List or Blob required for argument %d"); -static char e_blob_required_for_argument_nr[] +static const char e_blob_required_for_argument_nr[] = N_("E1238: Blob required for argument %d"); -static char e_invalid_value_for_blob_nr[] +static const char e_invalid_value_for_blob_nr[] = N_("E1239: Invalid value for blob: %d"); -static char e_string_or_function_required_for_argument_nr[] +static const char e_string_or_function_required_for_argument_nr[] = N_("E1256: String or function required for argument %d"); bool tv_in_free_unref_items = false; @@ -2868,7 +2868,7 @@ void f_list2blob(typval_T *argvars, typval_T *rettv, EvalFuncData fptr) varnumber_T n = tv_get_number_chk(TV_LIST_ITEM_TV(li), &error); if (error || n < 0 || n > 255) { if (!error) { - semsg(_(e_invalid_value_for_blob_nr), n); + semsg(_(e_invalid_value_for_blob_nr), (int)n); } ga_clear(&blob->bv_ga); return; |