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
  • lib
  • debugobjects.c
Find file BlameHistoryPermalink
  • Arnd Bergmann's avatar
    debugobjects: Avoid another unused variable warning · 163cf842
    Arnd Bergmann authored Mar 13, 2018
    debug_objects_maxchecked is only updated in __debug_check_no_obj_freed(),
    and only read in debug_objects_maxchecked, unfortunately both of these are
    optional and depend on different Kconfig symbols.
    
    When both CONFIG_DEBUG_OBJECTS_FREE and CONFIG_DEBUG_FS are disabled this
    warning is emitted:
    
      lib/debugobjects.c:56:14: error: 'debug_objects_maxchecked' defined but not used [-Werror=unused-variable]
    
    Rather than trying to add more complex #ifdef protections, mark the
    variable as __maybe_unused so it can be silently dropped when usused.
    
    Fixes: bd9dcd04
    
     ("debugobjects: Export max loops counter")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Acked-by: default avatarYang Shi <yang.shi@linux.alibaba.com>
    Cc: Waiman Long <longman@redhat.com>
    Link: https://lkml.kernel.org/r/20180313131857.158876-1-arnd@arndb.de
    163cf842
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7