Project

General

Profile

Bug #10383

myri10ge: 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-11
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

Build error with NULL pointer:

    ../../common/io/myri10ge/drv/myri10ge.c: In function 'myri10ge_pull_jpool':
    ../../common/io/myri10ge/drv/myri10ge.c:416:13: error: comparison between pointer and integer [-Werror]
       if (*putp == NULL)
                 ^~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/io/myri10ge/drv/myri10ge_var.h:36,
                     from ../../common/io/myri10ge/drv/myri10ge.c:38:
    ../../common/io/myri10ge/drv/myri10ge.c: In function 'myri10ge_pullup':
    ../../common/sys/null.h:32:14: error: passing argument 4 of 'mac_hcksum_set' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/myri10ge/drv/myri10ge.c:2916:35: note: in expansion of macro 'NULL'
      mac_hcksum_set(mp, start, stuff, NULL, NULL, tx_offload_flags);
                                       ^~~~
    In file included from ../../common/io/myri10ge/drv/myri10ge_var.h:47:0,
                     from ../../common/io/myri10ge/drv/myri10ge.c:38:
    ../../common/sys/mac_provider.h:564:15: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
     extern void   mac_hcksum_set(mblk_t *, uint32_t, uint32_t,
                   ^~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/io/myri10ge/drv/myri10ge_var.h:36,
                     from ../../common/io/myri10ge/drv/myri10ge.c:38:
    ../../common/sys/null.h:32:14: error: passing argument 5 of 'mac_hcksum_set' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/myri10ge/drv/myri10ge.c:2916:41: note: in expansion of macro 'NULL'
      mac_hcksum_set(mp, start, stuff, NULL, NULL, tx_offload_flags);
                                             ^~~~
    In file included from ../../common/io/myri10ge/drv/myri10ge_var.h:47:0,
                     from ../../common/io/myri10ge/drv/myri10ge.c:38:
    ../../common/sys/mac_provider.h:564:15: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
     extern void   mac_hcksum_set(mblk_t *, uint32_t, uint32_t,
                   ^~~~~~~~~~~~~~
    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 336380cbc80cdb79336de7f2b9a5d418c0991618

commit  336380cbc80cdb79336de7f2b9a5d418c0991618
Author: Toomas Soome <tsoome@me.com>
Date:   2019-02-20T22:15:48.000Z

    10383 myri10ge: NULL pointer errors
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Reviewed by: Andy Fiddaman <af@citrus-it.net>
    Approved by: Robert Mustacchi <rm@joyent.com>

Also available in: Atom PDF