Skip to content

NetBSD compile warning ("potential null pointer dereference") #1662

@Explorer09

Description

@Explorer09

This warning is when building htop for NetBSD, with GCC with -flto enabled

lto-wrapper: warning: using serial compilation of 3 LTRANS jobs
DisplayOptionsPanel.c: In function ‘DisplayOptionsPanel_eventHandler’:
DisplayOptionsPanel.c:98:14: error: potential null pointer dereference [-Werror=null-dereference]
   98 |          if (OptionItem_kind(selected) == OPTION_ITEM_NUMBER) {
      |              ^
lto1: all warnings being treated as errors
lto-wrapper: fatal error: gcc returned 1 exit status

I actually caught this one in CI (build log), and yet I don't know how to fix it at the moment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions