aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/ex_docmd.c4
-rw-r--r--src/nvim/ex_getln.c2
-rw-r--r--src/nvim/normal.c5
-rw-r--r--src/nvim/tui/tui.c3
4 files changed, 4 insertions, 10 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index afe2660cdf..30e7ecd434 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -10397,8 +10397,6 @@ bool cmd_can_preview(char_u *cmd)
Dictionary commands_array(buf_T *buf)
{
Dictionary rv = ARRAY_DICT_INIT;
- Object obj = NIL;
- (void)obj; // Avoid "dead assignment" warning.
char str[20];
garray_T *gap = (buf == NULL) ? &ucmds : &buf->b_ucmds;
@@ -10429,7 +10427,7 @@ Dictionary commands_array(buf_T *buf)
PUT(d, "complete_arg", cmd->uc_compl_arg == NULL
? NIL : STRING_OBJ(cstr_to_string((char *)cmd->uc_compl_arg)));
- obj = NIL;
+ Object obj = NIL;
if (cmd->uc_argt & COUNT) {
if (cmd->uc_def >= 0) {
snprintf(str, sizeof(str), "%" PRId64, (int64_t)cmd->uc_def);
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index b2dc90f3fb..2578d1837a 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -2007,7 +2007,7 @@ getcmdline (
int firstc,
long count, // only used for incremental search
int indent, // indent for inside conditionals
- bool do_concat // unused
+ bool do_concat FUNC_ATTR_UNUSED
)
{
// Be prepared for situations where cmdline can be invoked recursively.
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index d0b9fd4589..3aff3cef84 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -3760,7 +3760,6 @@ find_decl (
bool retval = true;
bool incll;
int searchflags = flags_arg;
- bool valid;
pat = xmalloc(len + 7);
@@ -3795,8 +3794,6 @@ find_decl (
/* Search forward for the identifier, ignore comment lines. */
clearpos(&found_pos);
for (;; ) {
- valid = false;
- (void)valid; // Avoid "dead assignment" warning.
t = searchit(curwin, curbuf, &curwin->w_cursor, NULL, FORWARD,
pat, 1L, searchflags, RE_LAST, NULL);
if (curwin->w_cursor.lnum >= old_pos.lnum) {
@@ -3831,7 +3828,7 @@ find_decl (
curwin->w_cursor.col = 0;
continue;
}
- valid = is_ident(get_cursor_line_ptr(), curwin->w_cursor.col);
+ bool valid = is_ident(get_cursor_line_ptr(), curwin->w_cursor.col);
// If the current position is not a valid identifier and a previous match is
// present, favor that one instead.
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c
index e168cf079a..e9276db484 100644
--- a/src/nvim/tui/tui.c
+++ b/src/nvim/tui/tui.c
@@ -1073,9 +1073,8 @@ static void tui_mode_change(UI *ui, String mode, Integer mode_idx)
static void tui_grid_scroll(UI *ui, Integer g, Integer startrow, Integer endrow,
Integer startcol, Integer endcol,
- Integer rows, Integer cols)
+ Integer rows, Integer cols FUNC_ATTR_UNUSED)
{
- (void)cols; // unused
TUIData *data = ui->data;
UGrid *grid = &data->grid;
int top = (int)startrow, bot = (int)endrow-1;