Project

General

Profile

Actions

Bug #15491

closed

libipadm: the comparison will always evaluate as 'true'

Added by Toomas Soome 2 months ago. Updated 19 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
External Bug:

Description

Build error with gcc 12:

    ../common/ipadm_addr.c: In function 'i_ipadm_op_dhcp':
    ../common/ipadm_addr.c:3229:70: error: the comparison will always evaluate as 'true' for the address of 'ipadm_reqhost' will never be NULL [-Werror=address]
     3229 |                 if (addr->ipadm_af == AF_INET && addr->ipadm_reqhost != NULL &&
              |                                                                          ^~
    In file included from ../common/ipadm_addr.c:62:
    ../common/libipadm_impl.h:99:49: note: 'ipadm_reqhost' declared here
       99 |                         char                    ipadm_reqhost[MAXNAMELEN];
            |                                                    ^~~~~~~~~~~~~
    cc1: all warnings being treated as errors

Testing done: tracked nwamd with dtrace for i_ipadm_op_dhcp() calls.


Related issues

Related to illumos gate - Feature #7388: Support -h <hostname> for ipadm DHCPClosedC Fraire2016-09-17

Actions
Actions

Also available in: Atom PDF