10725 sol_ucma: NULL pointer errors

Review Request #1691 - Created April 10, 2019 and submitted

Information
Toomas Soome
illumos-gate
10725
1ce1085...
Reviewers
general
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

  
Sebastian Wiedenroth
Robert Mustacchi
Toomas Soome
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...