Project

General

Profile

Actions

Bug #15491

closed

libipadm: the comparison will always evaluate as 'true'

Added by Toomas Soome 3 months ago. Updated 22 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 #1

Updated by Electric Monk 3 months ago

  • Gerrit CR set to 2722
Actions #2

Updated by Toomas Soome 3 months ago

  • Description updated (diff)
Actions #3

Updated by Toomas Soome 23 days ago

  • Description updated (diff)
  • Status changed from In Progress to Pending RTI
Actions #4

Updated by Dan McDonald 22 days ago

  • Related to Feature #7388: Support -h <hostname> for ipadm DHCP added
Actions #5

Updated by Electric Monk 22 days ago

  • Status changed from Pending RTI to Closed
  • % Done changed from 90 to 100

git commit 638e3f1028035342a81333f470e01d8e7e94c0fd

commit  638e3f1028035342a81333f470e01d8e7e94c0fd
Author: Toomas Soome <tsoome@me.com>
Date:   2023-05-09T14:36:03.000Z

    15491 libipadm: the comparison will always evaluate as 'true'
    Reviewed by: Dan Cross <cross@oxidecomputer.com>
    Reviewed by: Igor Kozhukhov <igor@dilos.org>
    Approved by: Dan McDonald <danmcd@mnx.io>

Actions

Also available in: Atom PDF