A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/neovim/neovim/commit/c3a6ff6aa3be259255976b1178dd07ac876ff124 below:

dead code and operands don't affect result #17662 · neovim/neovim@c3a6ff6 · GitHub

File tree Expand file treeCollapse file tree 6 files changed

+8

-15

lines changed

Filter options

Expand file treeCollapse file tree 6 files changed

+8

-15

lines changed Original file line number Diff line number Diff line change

@@ -2428,9 +2428,8 @@ char *aucmd_exec_default_desc(AucmdExecutable acc)

2428 2428

default:

2429 2429

return NULL;

2430 2430

}

2431 - 2432 -

abort();

2433 2431

}

2432 + 2434 2433

char *aucmd_exec_to_string(AutoCmd *ac, AucmdExecutable acc)

2435 2434

{

2436 2435

switch (acc.type) {

Original file line number Diff line number Diff line change

@@ -630,7 +630,7 @@ static char_u *mark_line(pos_T *mp, int lead_len)

630 630

if (mp->lnum == 0 || mp->lnum > curbuf->b_ml.ml_line_count) {

631 631

return vim_strsave((char_u *)"-invalid-");

632 632

}

633 -

assert(Columns >= 0 && (size_t)Columns <= SIZE_MAX);

633 +

assert(Columns >= 0);

634 634

// Allow for up to 5 bytes per character.

635 635

s = vim_strnsave(skipwhite(ml_get(mp->lnum)), (size_t)Columns * 5);

636 636 Original file line number Diff line number Diff line change

@@ -3568,7 +3568,6 @@ static void nv_zet(cmdarg_T *cap)

3568 3568

bool undo = false;

3569 3569 3570 3570

int l_p_siso = (int)get_sidescrolloff_value(curwin);

3571 -

assert(l_p_siso <= INT_MAX);

3572 3571 3573 3572

if (ascii_isdigit(nchar)) {

3574 3573

/*

Original file line number Diff line number Diff line change

@@ -5664,12 +5664,10 @@ void comp_col(void)

5664 5664

}

5665 5665

}

5666 5666

assert(sc_col >= 0

5667 -

&& INT_MIN + sc_col <= Columns

5668 -

&& Columns - sc_col <= INT_MAX);

5667 +

&& INT_MIN + sc_col <= Columns);

5669 5668

sc_col = Columns - sc_col;

5670 5669

assert(ru_col >= 0

5671 -

&& INT_MIN + ru_col <= Columns

5672 -

&& Columns - ru_col <= INT_MAX);

5670 +

&& INT_MIN + ru_col <= Columns);

5673 5671

ru_col = Columns - ru_col;

5674 5672

if (sc_col <= 0) { // screen too narrow, will become a mess

5675 5673

sc_col = 1;

Original file line number Diff line number Diff line change

@@ -289,8 +289,7 @@ void pum_display(pumitem_T *array, int size, int selected, bool array_changed, i

289 289

if (pum_rl) {

290 290

pum_width = pum_col - pum_scrollbar + 1;

291 291

} else {

292 -

assert(Columns - pum_col - pum_scrollbar >= INT_MIN

293 -

&& Columns - pum_col - pum_scrollbar <= INT_MAX);

292 +

assert(Columns - pum_col - pum_scrollbar >= 0);

294 293

pum_width = Columns - pum_col - pum_scrollbar;

295 294

}

296 295

@@ -356,7 +355,6 @@ void pum_display(pumitem_T *array, int size, int selected, bool array_changed, i

356 355

} else {

357 356

pum_col = 0;

358 357

}

359 -

assert(Columns - 1 >= INT_MIN);

360 358

pum_width = Columns - 1;

361 359

} else {

362 360

if (max_width > p_pw) {

@@ -367,8 +365,7 @@ void pum_display(pumitem_T *array, int size, int selected, bool array_changed, i

367 365

if (pum_rl) {

368 366

pum_col = max_width - 1;

369 367

} else {

370 -

assert(Columns - max_width >= INT_MIN

371 -

&& Columns - max_width <= INT_MAX);

368 +

assert(Columns - max_width >= 0);

372 369

pum_col = Columns - max_width;

373 370

}

374 371

pum_width = max_width - pum_scrollbar;

Original file line number Diff line number Diff line change

@@ -1475,8 +1475,8 @@ static void tui_guess_size(UI *ui)

1475 1475

// 1 - look for non-default 'columns' and 'lines' options during startup

1476 1476

if (data->is_starting && (Columns != DFLT_COLS || Rows != DFLT_ROWS)) {

1477 1477

did_user_set_dimensions = true;

1478 -

assert(Columns >= INT_MIN && Columns <= INT_MAX);

1479 -

assert(Rows >= INT_MIN && Rows <= INT_MAX);

1478 +

assert(Columns >= 0);

1479 +

assert(Rows >= 0);

1480 1480

width = Columns;

1481 1481

height = Rows;

1482 1482

goto end;

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4