mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 15:58:17 +00:00
Remove (void) hacks, Mark unused attrs
This commit is contained in:
@@ -10397,8 +10397,6 @@ bool cmd_can_preview(char_u *cmd)
|
|||||||
Dictionary commands_array(buf_T *buf)
|
Dictionary commands_array(buf_T *buf)
|
||||||
{
|
{
|
||||||
Dictionary rv = ARRAY_DICT_INIT;
|
Dictionary rv = ARRAY_DICT_INIT;
|
||||||
Object obj = NIL;
|
|
||||||
(void)obj; // Avoid "dead assignment" warning.
|
|
||||||
char str[20];
|
char str[20];
|
||||||
garray_T *gap = (buf == NULL) ? &ucmds : &buf->b_ucmds;
|
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
|
PUT(d, "complete_arg", cmd->uc_compl_arg == NULL
|
||||||
? NIL : STRING_OBJ(cstr_to_string((char *)cmd->uc_compl_arg)));
|
? NIL : STRING_OBJ(cstr_to_string((char *)cmd->uc_compl_arg)));
|
||||||
|
|
||||||
obj = NIL;
|
Object obj = NIL;
|
||||||
if (cmd->uc_argt & COUNT) {
|
if (cmd->uc_argt & COUNT) {
|
||||||
if (cmd->uc_def >= 0) {
|
if (cmd->uc_def >= 0) {
|
||||||
snprintf(str, sizeof(str), "%" PRId64, (int64_t)cmd->uc_def);
|
snprintf(str, sizeof(str), "%" PRId64, (int64_t)cmd->uc_def);
|
||||||
|
@@ -2007,7 +2007,7 @@ getcmdline (
|
|||||||
int firstc,
|
int firstc,
|
||||||
long count, // only used for incremental search
|
long count, // only used for incremental search
|
||||||
int indent, // indent for inside conditionals
|
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.
|
// Be prepared for situations where cmdline can be invoked recursively.
|
||||||
|
@@ -3760,7 +3760,6 @@ find_decl (
|
|||||||
bool retval = true;
|
bool retval = true;
|
||||||
bool incll;
|
bool incll;
|
||||||
int searchflags = flags_arg;
|
int searchflags = flags_arg;
|
||||||
bool valid;
|
|
||||||
|
|
||||||
pat = xmalloc(len + 7);
|
pat = xmalloc(len + 7);
|
||||||
|
|
||||||
@@ -3795,8 +3794,6 @@ find_decl (
|
|||||||
/* Search forward for the identifier, ignore comment lines. */
|
/* Search forward for the identifier, ignore comment lines. */
|
||||||
clearpos(&found_pos);
|
clearpos(&found_pos);
|
||||||
for (;; ) {
|
for (;; ) {
|
||||||
valid = false;
|
|
||||||
(void)valid; // Avoid "dead assignment" warning.
|
|
||||||
t = searchit(curwin, curbuf, &curwin->w_cursor, NULL, FORWARD,
|
t = searchit(curwin, curbuf, &curwin->w_cursor, NULL, FORWARD,
|
||||||
pat, 1L, searchflags, RE_LAST, NULL);
|
pat, 1L, searchflags, RE_LAST, NULL);
|
||||||
if (curwin->w_cursor.lnum >= old_pos.lnum) {
|
if (curwin->w_cursor.lnum >= old_pos.lnum) {
|
||||||
@@ -3831,7 +3828,7 @@ find_decl (
|
|||||||
curwin->w_cursor.col = 0;
|
curwin->w_cursor.col = 0;
|
||||||
continue;
|
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
|
// If the current position is not a valid identifier and a previous match is
|
||||||
// present, favor that one instead.
|
// present, favor that one instead.
|
||||||
|
@@ -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,
|
static void tui_grid_scroll(UI *ui, Integer g, Integer startrow, Integer endrow,
|
||||||
Integer startcol, Integer endcol,
|
Integer startcol, Integer endcol,
|
||||||
Integer rows, Integer cols)
|
Integer rows, Integer cols FUNC_ATTR_UNUSED)
|
||||||
{
|
{
|
||||||
(void)cols; // unused
|
|
||||||
TUIData *data = ui->data;
|
TUIData *data = ui->data;
|
||||||
UGrid *grid = &data->grid;
|
UGrid *grid = &data->grid;
|
||||||
int top = (int)startrow, bot = (int)endrow-1;
|
int top = (int)startrow, bot = (int)endrow-1;
|
||||||
|
Reference in New Issue
Block a user