diff options
-rw-r--r-- | src/nvim/eval/funcs.c | 9 | ||||
-rw-r--r-- | src/nvim/ops.c | 12 |
2 files changed, 11 insertions, 10 deletions
diff --git a/src/nvim/eval/funcs.c b/src/nvim/eval/funcs.c index 71ad0b7369..c97a6abf0e 100644 --- a/src/nvim/eval/funcs.c +++ b/src/nvim/eval/funcs.c @@ -7296,7 +7296,7 @@ static void f_getreginfo(typval_T *argvars, typval_T *rettv, FunPtr fptr) if (list == NULL) { return; } - tv_dict_add_list(dict, S_LEN("regcontents"), list); + (void)tv_dict_add_list(dict, S_LEN("regcontents"), list); char buf[NUMBUFLEN + 2]; buf[0] = NUL; @@ -7315,14 +7315,15 @@ static void f_getreginfo(typval_T *argvars, typval_T *rettv, FunPtr fptr) case kMTUnknown: abort(); } - tv_dict_add_str(dict, S_LEN("regtype"), buf); + (void)tv_dict_add_str(dict, S_LEN("regtype"), buf); buf[0] = get_register_name(get_unname_register()); buf[1] = NUL; if (regname == '"') { - tv_dict_add_str(dict, S_LEN("points_to"), buf); + (void)tv_dict_add_str(dict, S_LEN("points_to"), buf); } else { - tv_dict_add_bool(dict, S_LEN("isunnamed"), regname == buf[0] ? kBoolVarTrue : kBoolVarFalse); + (void)tv_dict_add_bool(dict, S_LEN("isunnamed"), + regname == buf[0] ? kBoolVarTrue : kBoolVarFalse); } } diff --git a/src/nvim/ops.c b/src/nvim/ops.c index 1d737ee9fc..0668924237 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -2817,17 +2817,17 @@ static void do_autocmd_textyankpost(oparg_T *oap, yankreg_T *reg) tv_list_append_string(list, (const char *)reg->y_array[i], -1); } tv_list_set_lock(list, VAR_FIXED); - tv_dict_add_list(dict, S_LEN("regcontents"), list); + (void)tv_dict_add_list(dict, S_LEN("regcontents"), list); // Register type. char buf[NUMBUFLEN+2]; format_reg_type(reg->y_type, reg->y_width, buf, ARRAY_SIZE(buf)); - tv_dict_add_str(dict, S_LEN("regtype"), buf); + (void)tv_dict_add_str(dict, S_LEN("regtype"), buf); // Name of requested register, or empty string for unnamed operation. buf[0] = (char)oap->regname; buf[1] = NUL; - tv_dict_add_str(dict, S_LEN("regname"), buf); + (void)tv_dict_add_str(dict, S_LEN("regname"), buf); // Motion type: inclusive or exclusive. tv_dict_add_bool(dict, S_LEN("inclusive"), @@ -2836,11 +2836,11 @@ static void do_autocmd_textyankpost(oparg_T *oap, yankreg_T *reg) // Kind of operation: yank, delete, change). buf[0] = (char)get_op_char(oap->op_type); buf[1] = NUL; - tv_dict_add_str(dict, S_LEN("operator"), buf); + (void)tv_dict_add_str(dict, S_LEN("operator"), buf); // Selection type: visual or not. - tv_dict_add_bool(dict, S_LEN("visual"), - oap->is_VIsual ? kBoolVarTrue : kBoolVarFalse); + (void)tv_dict_add_bool(dict, S_LEN("visual"), + oap->is_VIsual ? kBoolVarTrue : kBoolVarFalse); tv_dict_set_keys_readonly(dict); textlock++; |