aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r--src/nvim/ops.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index 8d36bc9aa4..55c34586cb 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++;
@@ -4252,7 +4252,7 @@ void op_formatexpr(oparg_T *oap)
/// @param c character to be inserted
int fex_format(linenr_T lnum, long count, int c)
{
- int use_sandbox = was_set_insecurely(curwin, (char_u *)"formatexpr", OPT_LOCAL);
+ int use_sandbox = was_set_insecurely(curwin, "formatexpr", OPT_LOCAL);
int r;
char_u *fex;
@@ -4816,7 +4816,7 @@ void op_addsub(oparg_T *oap, linenr_T Prenum1, bool g_cmd)
if (change_cnt == 1) {
MSG(_("1 line changed"));
} else {
- smsg((char *)_("%" PRId64 " lines changed"), (int64_t)change_cnt);
+ smsg(_("%" PRId64 " lines changed"), (int64_t)change_cnt);
}
}
}
@@ -6055,7 +6055,7 @@ bool prepare_yankreg_from_object(yankreg_T *reg, String regtype, size_t lines)
void finish_yankreg_from_object(yankreg_T *reg, bool clipboard_adjust)
{
- if (reg->y_size > 0 && strlen((char *)reg->y_array[reg->y_size-1]) == 0) {
+ if (reg->y_size > 0 && STRLEN(reg->y_array[reg->y_size-1]) == 0) {
// a known-to-be charwise yank might have a final linebreak
// but otherwise there is no line after the final newline
if (reg->y_type != kMTCharWise) {
@@ -6120,7 +6120,7 @@ static bool get_clipboard(int name, yankreg_T **target, bool quiet)
goto err;
}
char_u *regtype = TV_LIST_ITEM_TV(tv_list_last(res))->vval.v_string;
- if (regtype == NULL || strlen((char *)regtype) > 1) {
+ if (regtype == NULL || STRLEN(regtype) > 1) {
goto err;
}
switch (regtype[0]) {
@@ -6163,7 +6163,7 @@ static bool get_clipboard(int name, yankreg_T **target, bool quiet)
reg->y_array[tv_idx++] = (char_u *)xstrdupnul((const char *)TV_LIST_ITEM_TV(li)->vval.v_string);
});
- if (reg->y_size > 0 && strlen((char *)reg->y_array[reg->y_size-1]) == 0) {
+ if (reg->y_size > 0 && STRLEN(reg->y_array[reg->y_size-1]) == 0) {
// a known-to-be charwise yank might have a final linebreak
// but otherwise there is no line after the final newline
if (reg->y_type != kMTCharWise) {