11150 libdladm: NULL pointer errors

Review Request #1935 — Created June 1, 2019 and submitted

tsoome
illumos-gate
11150
e492efa...
general
../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


rzezeski
  1. Ship It!
  2. 
      
tsoome
tsoome
Review request changed

Status: Closed (submitted)

Loading...