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
You need to sign in or sign up before continuing.
  • linux
  • scripts
  • Makefile.extrawarn
Find file BlameHistoryPermalink
  • Nathan Chancellor's avatar
    kbuild: Disable -Wpointer-to-enum-cast · 82f2bc2f
    Nathan Chancellor authored Mar 11, 2020
    Clang's -Wpointer-to-int-cast deviates from GCC in that it warns when
    casting to enums. The kernel does this in certain places, such as device
    tree matches to set the version of the device being used, which allows
    the kernel to avoid using a gigantic union.
    
    https://elixir.bootlin.com/linux/v5.5.8/source/drivers/ata/ahci_brcm.c#L428
    https://elixir.bootlin.com/linux/v5.5.8/source/drivers/ata/ahci_brcm.c#L402
    https://elixir.bootlin.com/linux/v5.5.8/source/include/linux/mod_devicetable.h#L264
    
    To avoid a ton of false positive warnings, disable this particular part
    of the warning, which has been split off into a separate diagnostic so
    that the entire warning does not need to be turned off for clang. It
    will be visible under W=1 in case people want to go about fixing these
    easily and enabling the warning treewide.
    
    Cc: stable@vger.kernel.org
    Link: https://github.com/ClangBuiltLinux/linux/issues/887
    Link: https://github.com/llvm/llvm-project/commit/2a41b31fcdfcb67ab7038fc2ffb606fd50b83a84
    
    
    Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
    Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
    82f2bc2f
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7