Project

General

Profile

Bug #10725

sol_ucma: NULL pointer errors

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
driver - device drivers
Start date:
2019-04-10
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/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/modctl.h:35,
                     from ../../common/io/ib/clients/of/sol_ucma/sol_ucma.c:41:
    ../../common/io/ib/clients/of/sol_ucma/sol_ucma.c: In function 'sol_ucma_join_mcast':
    ../../common/sys/null.h:32:14: error: passing argument 2 of 'sol_ofs_uobj_init' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/ib/clients/of/sol_ucma/sol_ucma.c:1491:41: note: in expansion of macro 'NULL'
      sol_ofs_uobj_init(&mcastp->mcast_uobj, NULL, SOL_UCMA_MCAST_TYPE);
                                             ^~~~
    In file included from ../../common/io/ib/clients/of/sol_ucma/sol_ucma.c:57:0:
    ../../common/sys/ib/clients/of/sol_ofs/sol_ofs_common.h:103:6: note: expected 'uint64_t {aka long unsigned int}' but argument is of type 'void *'
     void sol_ofs_uobj_init(sol_ofs_uobj_t *, uint64_t, sol_ofs_uobj_type_t);
          ^~~~~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/modctl.h:35,
                     from ../../common/io/ib/clients/of/sol_ucma/sol_ucma.c:41:
    ../../common/io/ib/clients/of/sol_ucma/sol_ucma.c: In function 'ucma_alloc_file':
    ../../common/sys/null.h:32:14: error: passing argument 2 of 'sol_ofs_uobj_init' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/ib/clients/of/sol_ucma/sol_ucma.c:1771:42: note: in expansion of macro 'NULL'
      sol_ofs_uobj_init(&new_file->file_uobj, NULL, SOL_UCMA_EVT_FILE_TYPE);
                                              ^~~~
    In file included from ../../common/io/ib/clients/of/sol_ucma/sol_ucma.c:57:0:
    ../../common/sys/ib/clients/of/sol_ofs/sol_ofs_common.h:103:6: note: expected 'uint64_t {aka long unsigned int}' but argument is of type 'void *'
     void sol_ofs_uobj_init(sol_ofs_uobj_t *, uint64_t, sol_ofs_uobj_type_t);
          ^~~~~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/thread.h:36,
                     from ../../common/sys/modctl.h:35,
                     from ../../common/io/ib/clients/of/sol_ucma/sol_ucma.c:41:
    ../../common/io/ib/clients/of/sol_ucma/sol_ucma.c: In function 'ucma_alloc_chan':
    ../../common/sys/null.h:32:14: error: passing argument 2 of 'sol_ofs_uobj_init' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/ib/clients/of/sol_ucma/sol_ucma.c:1808:43: note: in expansion of macro 'NULL'
      sol_ofs_uobj_init(&new_chanp->chan_uobj, NULL, SOL_UCMA_CM_ID_TYPE);
                                               ^~~~
    In file included from ../../common/io/ib/clients/of/sol_ucma/sol_ucma.c:57:0:
    ../../common/sys/ib/clients/of/sol_ofs/sol_ofs_common.h:103:6: note: expected 'uint64_t {aka long unsigned int}' but argument is of type 'void *'
     void sol_ofs_uobj_init(sol_ofs_uobj_t *, uint64_t, sol_ofs_uobj_type_t);
          ^~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk 7 months ago

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

git commit d2a0120188ab7ddc6ec530e02b2fb3770b886f11

commit  d2a0120188ab7ddc6ec530e02b2fb3770b886f11
Author: Toomas Soome <tsoome@me.com>
Date:   2019-04-19T21:44:15.000Z

    10725 sol_ucma: NULL pointer errors
    Reviewed by: Sebastian Wiedenroth <sebastian.wiedenroth@skylime.net>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF