11134 libdevinfo: NULL pointer errors
Review Request #1918 — Created June 1, 2019 and submitted
Information | |
---|---|
tsoome | |
illumos-gate | |
11134 | |
6265f41... | |
Reviewers | |
general | |
../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
Change Summary:
cstyle fixes
Commit: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 2 (+42 -45) |