Project

General

Profile

Bug #10435

dld: NULL pointer errors

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
driver - device drivers
Start date:
2019-02-22
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

NULL pointer errors:

    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]
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

History

#1

Updated by Electric Monk 5 months ago

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

git commit 8648b7db4afb6cc9a8e5b55e38e99c8c64b74e86

commit  8648b7db4afb6cc9a8e5b55e38e99c8c64b74e86
Author: Toomas Soome <tsoome@me.com>
Date:   2019-02-25T20:43:02.000Z

    10435 dld: NULL pointer errors
    Reviewed by: Aurélien Larcher  <aurelien.larcher@gmail.com>
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Joshua M. Clulow <josh@sysmgr.org>

Also available in: Atom PDF