Ticket #4179: mc-4179-syntax.c-fix-deadcode.deadstores-warning.patch

File mc-4179-syntax.c-fix-deadcode.deadstores-warning.patch, 1.1 KB (added by and, 3 years ago)
  • src/editor/syntax.c

    From 742465b9ac10138f1a455fa79dacdb9b6917be93 Mon Sep 17 00:00:00 2001
    From: Andreas Mohr <and@gmx.li>
    Date: Tue, 18 May 2021 18:00:32 +0000
    Subject: [PATCH] (syntax.c) fix deadcode.DeadStores warning
    
    syntax.c:523:25: warning: Value stored to 'found_right' is never read [deadcode.DeadStores]
                            found_right = TRUE;
                            ^             ~~~~
    
    Found by Clang-11 analyzer
    
    Signed-off-by: Andreas Mohr <and@gmx.li>
    ---
     src/editor/syntax.c | 1 -
     1 file changed, 1 deletion(-)
    
    diff --git a/src/editor/syntax.c b/src/editor/syntax.c
    index e271641a1..9e7c9b836 100644
    a b apply_rules_going_right (WEdit * edit, off_t i) 
    520520                    if (e >= end && (_rule.keyword == 0 || keyword_foundright)) 
    521521                    { 
    522522                        _rule.end = e; 
    523                         found_right = TRUE; 
    524523                        _rule.border = RULE_ON_LEFT_BORDER; 
    525524                        _rule._context = count; 
    526525                        if (!r->between_delimiters && _rule.keyword == 0)