Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • scripts
  • checkpatch.pl
Find file BlameHistoryPermalink
  • Sven Eckelmann's avatar
    checkpatch: remove false unbalanced braces warning · 95330473
    Sven Eckelmann authored Feb 24, 2017
    Lines containing "} else {" should not be detected as unbalanced braces.
    But the second check can be reduced to ".+else\s*{" and it therefore
    never checked if the beginning of a line contains any other character
    (like the relevant "}").  This check would also return true for "} else
    {" and create warnings like
    
        CHECK: Unbalanced braces around else statement
        #391: FILE: ./net/batman-adv/tvlv.c:391:
        +   } else {
    
    The check can be changed to check the whole line for the missing "}" to
    avoid this false positive.
    
    Fixes: 0d1532456c26 ("checkpatch: notice unbalanced else braces in a patch")
    Link: http://lkml.kernel.org/r/20170220121644.12209-1-sven@narfation.org
    
    
    Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
    Acked-by: default avatarJoe Perches <joe@perches.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    95330473
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7