Project

General

Profile

Actions

Bug #11417

closed

rcm_daemon: NULL pointer errors

Added by Toomas Soome over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

Build errors with NULL pointer:

    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82,
                     from ../common/rcm_impl.h:37,
                     from ../common/rcm_subr.c:27:
    ../common/rcm_subr.c: In function 'rcmd_db_clean':
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'thr_create' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/rcm_subr.c:1753:23: note: in expansion of macro 'NULL'
      if (thr_create(NULL, NULL, (void *(*)(void *))db_clean,
                           ^~~~
    In file included from ../common/rcm_impl.h:50:0,
                     from ../common/rcm_subr.c:27:
    /code/illumos-gate/proto/root_i386/usr/include/thread.h:54:12: note: expected 'size_t {aka unsigned int}' but argument is of type 'void *'
     extern int thr_create(void *, size_t, void *(*)(void *), void *, long,
                ^~~~~~~~~~

    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82,
                     from ../common/ip_rcm.c:30:
    ../common/ip_rcm.c: In function 'rcm_mod_init':
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'mutex_init' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/ip_rcm.c:254:33: note: in expansion of macro 'NULL'
      (void) mutex_init(&cache_lock, NULL, NULL);
                                     ^~~~
    In file included from ../common/ip_rcm.c:35:0:
    /code/illumos-gate/proto/root_i386/usr/include/synch.h:109:5: note: expected 'int' but argument is of type 'void *'
     int mutex_init(mutex_t *, int, void *);
         ^~~~~~~~~~

    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82,
                     from ../common/aggr_rcm.c:30:
    ../common/aggr_rcm.c: In function 'rcm_mod_init':
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'mutex_init' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/aggr_rcm.c:185:37: note: in expansion of macro 'NULL'
      (void) mutex_init(&aggr_list_lock, NULL, NULL);
                                         ^~~~
    In file included from ../common/aggr_rcm.c:37:0:
    /code/illumos-gate/proto/root_i386/usr/include/synch.h:109:5: note: expected 'int' but argument is of type 'void *'
     int mutex_init(mutex_t *, int, void *);
         ^~~~~~~~~~

    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/time_iso.h:49:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/time.h:40,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/time.h:462,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/select.h:53,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/types.h:640,
                     from /code/illumos-gate/proto/root_i386/usr/include/alloca.h:32,
                     from ../common/network_rcm.c:30:
    ../common/network_rcm.c: In function 'rcm_mod_init':
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'mutex_init' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/network_rcm.c:144:33: note: in expansion of macro 'NULL'
      (void) mutex_init(&cache_lock, NULL, NULL);
                                     ^~~~
    In file included from ../common/network_rcm.c:36:0:
    /code/illumos-gate/proto/root_i386/usr/include/synch.h:109:5: note: expected 'int' but argument is of type 'void *'
     int mutex_init(mutex_t *, int, void *);
         ^~~~~~~~~~
    cc1: all warnings being treated as errors

Actions #1

Updated by Electric Monk over 4 years ago

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

git commit 46fbc806d6e97aff59942e61f3f01b8abc70b716

commit  46fbc806d6e97aff59942e61f3f01b8abc70b716
Author: Toomas Soome <tsoome@me.com>
Date:   2019-07-30T18:17:54.000Z

    11417 rcm_daemon: NULL pointer errors
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF