Project

General

Profile

Actions

Bug #10646

closed

softmac: NULL pointer errors

Added by Toomas Soome about 3 years ago. Updated about 3 years ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Build errors with NULL pointer:

In file included from ../../common/sys/model.h:35:0,
                 from ../../common/sys/file.h:37,
                 from ../../common/io/softmac/softmac_fp.c:117:
../../common/io/softmac/softmac_fp.c: In function 'softmac_taskq_dispatch':
../../common/io/softmac/softmac_fp.c:855:50: error: comparison between pointer and integer [-Werror]
        softmac_wput_nondata_task, sup, TQ_SLEEP) != NULL);
                                                  ^
../../common/sys/debug.h:57:29: note: in definition of macro 'VERIFY'
 #define VERIFY(EX) ((void)((EX) || assfail(#EX, __FILE__, __LINE__)))
                             ^~
../../common/io/softmac/softmac_fp.c: In function 'softmac_wput_nondata':
../../common/io/softmac/softmac_fp.c:896:23: error: comparison between pointer and integer [-Werror]
      sup, TQ_NOSLEEP) != NULL) {
                       ^~
In file included from ../../common/sys/param.h:48:0,
                 from ../../common/sys/t_lock.h:38,
                 from ../../common/sys/signal.h:249,
                 from ../../common/sys/procset.h:40,
                 from ../../common/sys/priocntl.h:36,
                 from ../../common/sys/disp.h:35,
                 from ../../common/io/softmac/softmac_fp.c:114:
../../common/io/softmac/softmac_fp.c: In function 'softmac_wput_data':
../../common/sys/null.h:32:14: error: passing argument 3 of 'softmac_fastpath_wput_data' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../../common/io/softmac/softmac_fp.c:990:46: note: in expansion of macro 'NULL'
   (void) softmac_fastpath_wput_data(sup, mp, NULL, 0);
                                              ^~~~
../../common/io/softmac/softmac_fp.c:132:24: note: expected 'uintptr_t {aka long unsigned int}' but argument is of type 'void *'
 static mac_tx_cookie_t softmac_fastpath_wput_data(softmac_upper_t *, mblk_t *,
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~
../../common/io/softmac/softmac_fp.c: In function 'softmac_fastpath_wput_data':
../../common/io/softmac/softmac_fp.c:1021:10: error: return makes integer from pointer without a cast [-Werror=int-conversion]
   return (NULL);
          ^
cc1: all warnings being treated as errors

Actions #1

Updated by Electric Monk about 3 years ago

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

git commit 4138d84ec424020fc615b6aa351408e1efb98a38

commit  4138d84ec424020fc615b6aa351408e1efb98a38
Author: Toomas Soome <tsoome@me.com>
Date:   2019-04-10T05:56:52.000Z

    10646 softmac: NULL pointer errors
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Reviewed by: Gergő Doma <domag02@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF