10435 dld: NULL pointer errors

Review Request #1504 - Created Feb. 22, 2019 and submitted

Information
Toomas Soome
illumos-gate
10435
9402698...
Reviewers
general
In file included from ../../common/sys/param.h:48:0,
                 from ../../common/sys/sysmacros.h:37,
                 from ../../common/inet/common.h:42,
                 from ../../common/io/dld/dld_str.c:29:
../../common/io/dld/dld_str.c: In function 'dld_wput':
../../common/sys/null.h:32:14: error: passing argument 2 of 'mac_tx_is_flow_blocked' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../../common/sys/dld_impl.h:331:45: note: in expansion of macro 'NULL'
      !mac_tx_is_flow_blocked((dsp)->ds_mch, NULL)) { \
                                             ^~~~
../../common/io/dld/dld_str.c:451:4: note: in expansion of macro 'DLD_CLRQFULL'
    DLD_CLRQFULL(dsp);
    ^~~~~~~~~~~~
In file included from ../../common/sys/dls.h:31:0,
                 from ../../common/sys/dls_impl.h:30,
                 from ../../common/sys/dld_impl.h:35,
                 from ../../common/io/dld/dld_str.c:34:
../../common/sys/mac_client.h:143:18: note: expected 'mac_tx_cookie_t {aka long unsigned int}' but argument is of type 'void *'
 extern boolean_t mac_tx_is_flow_blocked(mac_client_handle_t, mac_tx_cookie_t);
                  ^~~~~~~~~~~~~~~~~~~~~~
In file included from ../../common/sys/param.h:48:0,
                 from ../../common/sys/sysmacros.h:37,
                 from ../../common/inet/common.h:42,
                 from ../../common/io/dld/dld_str.c:29:
../../common/io/dld/dld_str.c: In function 'dld_wsrv':
../../common/sys/null.h:32:14: error: passing argument 2 of 'mac_tx_is_flow_blocked' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../../common/sys/dld_impl.h:331:45: note: in expansion of macro 'NULL'
      !mac_tx_is_flow_blocked((dsp)->ds_mch, NULL)) { \
                                             ^~~~
../../common/io/dld/dld_str.c:476:2: note: in expansion of macro 'DLD_CLRQFULL'
  DLD_CLRQFULL(dsp);
  ^~~~~~~~~~~~
In file included from ../../common/sys/dls.h:31:0,
                 from ../../common/sys/dls_impl.h:30,
                 from ../../common/sys/dld_impl.h:35,
                 from ../../common/io/dld/dld_str.c:34:
../../common/sys/mac_client.h:143:18: note: expected 'mac_tx_cookie_t {aka long unsigned int}' but argument is of type 'void *'
 extern boolean_t mac_tx_is_flow_blocked(mac_client_handle_t, mac_tx_cookie_t);
                  ^~~~~~~~~~~~~~~~~~~~~~
../../common/io/dld/dld_str.c: In function 'str_mdata_fastpath_put':
../../common/io/dld/dld_str.c:885:47: error: comparison between pointer and integer [-Werror]
  if ((cookie = DLD_TX(dsp, mp, f_hint, flag)) != NULL) {
                                               ^~
../../common/io/dld/dld_str.c:893:9: error: return makes integer from pointer without a cast [-Werror=int-conversion]
  return (NULL);
         ^
../../common/io/dld/dld_str.c: In function 'str_mdata_raw_put':
../../common/io/dld/dld_str.c:986:28: error: comparison between pointer and integer [-Werror]
  if (DLD_TX(dsp, mp, 0, 0) != NULL) {
                            ^~
cc1: all warnings being treated as errors
../../common/io/dld/dld_proto.c: In function 'proto_unitdata_req':
../../common/io/dld/dld_proto.c:1270:28: error: comparison between pointer and integer [-Werror]
  if (DLD_TX(dsp, bp, 0, 0) != NULL) {
                            ^~
cc1: all warnings being treated as errors

  
Aurélien Larcher
Andrew Stormont
Robert Mustacchi
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...