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
  • kernel-doc
Find file BlameHistoryPermalink
  • Laurent Pinchart's avatar
    scripts/kernel-doc: Override -Werror from KCFLAGS with KDOC_WERROR · bed4ed30
    Laurent Pinchart authored Jul 31, 2021
    Since commit 2c12c810
    
     ("scripts/kernel-doc: optionally treat
    warnings as errors"), the kernel-doc script will treat warnings as
    errors when one of the following conditions is true:
    
    - The KDOC_WERROR environment variable is non-zero
    - The KCFLAGS environment variable contains -Werror
    - The -Werror parameter is passed to kernel-doc
    
    Checking KCFLAGS for -Werror allows piggy-backing on the C compiler
    error handling. However, unlike the C compiler, kernel-doc has no
    provision for -Wno-error. This makes compiling the kernel with -Werror
    (to catch regressions) and W=1 (to enable more checks) always fail,
    without the same possibility as offered by the C compiler to treating
    some selected warnings as warnings despite the global -Werror setting.
    
    To fix this, evaluate KDOC_WERROR after KCFLAGS, which allows disabling
    the warnings-as-errors behaviour of kernel-doc selectively by setting
    KDOC_WERROR=0.
    
    Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
    Link: https://lore.kernel.org/r/20210730225401.4401-1-laurent.pinchart+renesas@ideasonboard.com
    
    
    Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
    bed4ed30
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7