Project

General

Profile

Bug #11134

libdevinfo: NULL pointer errors

Added by Toomas Soome 5 months ago. Updated 4 months ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

NULL pointer errors:

    ../devinfo_devperm.c: In function 'getnexttoken':
    ../devinfo_devperm.c:679:8: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
        *cp = NULL; /* terminate token */
            ^
    ../devfsinfo.c: In function 'devfs_bootdev_set_list':
    ../devfsinfo.c:494:8: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       *ptr = NULL;
            ^
    ../devfsinfo.c: In function 'devfs_dev_to_prom_names':
    ../devfsinfo.c:1355:23: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
        prom_path[len - 1] = NULL;
                           ^

    ../devinfo.c: In function 'di_drv_next_node':
    ../devinfo.c:470:26: error: comparison between pointer and integer [-Werror]
      if (DI_NODE(node)->next == NULL) {
                              ^~
    ../devinfo.c: In function 'di_vhci_first_node':
    ../devinfo.c:2379:28: error: comparison between pointer and integer [-Werror]
      if (dap->top_vhci_devinfo == NULL) {
                                ^~
    ../devinfo.c: In function 'di_vhci_next_node':
    ../devinfo.c:2400:31: error: comparison between pointer and integer [-Werror]
      if (DI_NODE(node)->next_vhci == NULL) {
                                   ^~
    ../devinfo.c: In function 'di_phci_first_node':
    ../devinfo.c:2428:35: error: comparison between pointer and integer [-Werror]
      if (DI_NODE(vhci_node)->top_phci == NULL) {
                                       ^~
    ../devinfo.c: In function 'di_phci_next_node':
    ../devinfo.c:2449:31: error: comparison between pointer and integer [-Werror]
      if (DI_NODE(node)->next_phci == NULL) {
                                   ^~
    ../devinfo.c: In function 'di_prom_prop_data':
    ../devinfo.c:3031:10: error: return makes integer from pointer without a cast [-Werror=int-conversion]
       return (NULL);
              ^
    ../devinfo.c: In function 'di_lnode_next':
    ../devinfo.c:3463:29: error: comparison between pointer and integer [-Werror]
       if (DI_NODE(node)->lnodes != NULL)
                                 ^~
    ../devinfo.c:3467:34: error: comparison between pointer and integer [-Werror]
       if (DI_LNODE(lnode)->node_next != NULL)
                                      ^~
    ../devinfo.c: In function 'di_link_next_by_node':
    ../devinfo.c:3498:33: error: comparison between pointer and integer [-Werror]
        if (DI_NODE(node)->src_links != NULL)
                                     ^~
    ../devinfo.c:3502:37: error: comparison between pointer and integer [-Werror]
        if (DI_LINK(link)->src_node_next != NULL)
                                         ^~
    ../devinfo.c:3508:33: error: comparison between pointer and integer [-Werror]
        if (DI_NODE(node)->tgt_links != NULL)
                                     ^~
    ../devinfo.c:3512:37: error: comparison between pointer and integer [-Werror]
        if (DI_LINK(link)->tgt_node_next != NULL)
                                         ^~
    ../devinfo.c: In function 'di_link_next_by_lnode':
    ../devinfo.c:3544:34: error: comparison between pointer and integer [-Werror]
        if (DI_LNODE(lnode)->link_out == NULL)
                                      ^~
    ../devinfo.c:3549:37: error: comparison between pointer and integer [-Werror]
        if (DI_LINK(link)->src_link_next == NULL)
                                         ^~
    ../devinfo.c:3556:33: error: comparison between pointer and integer [-Werror]
        if (DI_LNODE(lnode)->link_in == NULL)
                                     ^~
    ../devinfo.c:3561:37: error: comparison between pointer and integer [-Werror]
        if (DI_LINK(link)->tgt_link_next == NULL)
                                         ^~
    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk 4 months ago

  • % Done changed from 90 to 100
  • Status changed from In Progress to Closed

git commit f00128d8e2d39a5be61357047531dc79fde48623

commit  f00128d8e2d39a5be61357047531dc79fde48623
Author: Toomas Soome <tsoome@me.com>
Date:   2019-06-24T20:11:08.000Z

    11134 libdevinfo: NULL pointer errors
    Reviewed by: Jason Lippert <jason@glasspelican.ca>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF