From d40f3d89e780f60556c8fd0a0cd24e3a13e435ee Mon Sep 17 00:00:00 2001
From: Andreas Mohr <and@gmx.li>
Date: Tue, 18 May 2021 17:54:12 +0000
Subject: [PATCH] (editdraw.c) fix deadcode.DeadStores warning
editdraw.c:536:5: warning: Value stored to 'color' is never read [deadcode.DeadStores]
color = edit_get_syntax_color (edit, b - 1);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Found by Clang-11 analyzer
Signed-off-by: Andreas Mohr <and@gmx.li>
---
src/editor/editdraw.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/editor/editdraw.c b/src/editor/editdraw.c
index 521c2e63a..015fa66e9 100644
a
|
b
|
edit_draw_this_line (WEdit * edit, off_t b, long row, long start_col, long end_c |
507 | 507 | line_s *p = line; |
508 | 508 | off_t q; |
509 | 509 | int col, start_col_real; |
510 | | int color; |
511 | 510 | int abn_style; |
512 | 511 | int book_mark = 0; |
513 | 512 | char line_stat[LINE_STATE_WIDTH + 1] = "\0"; |
… |
… |
edit_draw_this_line (WEdit * edit, off_t b, long row, long start_col, long end_c |
533 | 532 | end_col--; |
534 | 533 | } |
535 | 534 | |
536 | | color = edit_get_syntax_color (edit, b - 1); |
537 | 535 | q = edit_move_forward3 (edit, b, start_col - edit->start_col, 0); |
538 | 536 | col = (int) edit_move_forward3 (edit, b, 0, q); |
539 | 537 | start_col_real = col + edit->start_col; |
… |
… |
edit_draw_this_line (WEdit * edit, off_t b, long row, long start_col, long end_c |
623 | 621 | p->style |= book_mark << 16; |
624 | 622 | else |
625 | 623 | { |
| 624 | int color; |
| 625 | |
626 | 626 | color = edit_get_syntax_color (edit, q); |
627 | 627 | p->style |= color << 16; |
628 | 628 | } |