Project

General

Profile

Bug #11150

libdladm: NULL pointer errors

Added by Toomas Soome 4 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:

    ../common/libdlmgmt.c: In function 'dladm_getnext_conf_linkprop':
    ../common/libdlmgmt.c:517:17: error: comparison between pointer and integer [-Werror]
          &oattrsz)) != NULL) {
                     ^~

    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdlib_iso.h:50:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/stdlib.h:37,
                     from ../common/flowprop.c:26:
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/flowprop.c:64:19: note: in expansion of macro 'NULL'
      { "maxbw", { "", NULL }, NULL, 0, B_FALSE,
                       ^~~~
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'prop_table[0].pd_defval.vd_val')
     #define NULL ((void *)0)
                  ^
    ../common/flowprop.c:64:19: note: in expansion of macro 'NULL'
      { "maxbw", { "", NULL }, NULL, 0, B_FALSE,
                       ^~~~

    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82,
                     from ../common/libdlwlan.c:27:
    ../common/libdlwlan.c: In function 'dladm_wlan_connect':
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/libdlwlan.c:562:31: note: in expansion of macro 'NULL'
      connect_state_t  state = {0, NULL, NULL};
                                   ^~~~
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'state.cs_count')
     #define NULL ((void *)0)
                  ^
    ../common/libdlwlan.c:562:31: note: in expansion of macro 'NULL'
      connect_state_t  state = {0, NULL, NULL};
                                   ^~~~

    ../common/linkprop.c: In function 'check_allowedips':
    ../common/linkprop.c:2662:17: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       vdp[i].vd_val = NULL;
                     ^
    ../common/linkprop.c: In function 'check_allowedcids':
    ../common/linkprop.c:3000:17: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       vdp[i].vd_val = NULL;
                     ^
    ../common/linkprop.c: In function 'check_secondary_macs':
    ../common/linkprop.c:3068:17: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       vdp[i].vd_val = 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 c0e21d6af8bfe88f1c49c7c12d4537b663fe9db9

commit  c0e21d6af8bfe88f1c49c7c12d4537b663fe9db9
Author: Toomas Soome <tsoome@me.com>
Date:   2019-06-25T05:26:54.000Z

    11150 libdladm: NULL pointer errors
    Reviewed by: Ryan Zezeski <rpz@joyent.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF