11417 rcm_daemon: NULL pointer errors

Review Request #2137 - Created July 11, 2019 and updated

Information
Toomas Soome
illumos-gate
11417
f579d2b...
Reviewers
general
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

  

Issues

  • 0
  • 3
  • 0
  • 3
Description From Last Updated
Toomas Soome
Review request changed

Change Summary:

use USYNC_THREAD

Commit:

-5ad54914c8170d24d2df77f13c042ae9f168df2b
+f579d2b18fbeb6ecbbeea4b74a1f87d673a5d533

Diff:

Revision 2 (+36 -38)

Show changes

Andy Fiddaman

   
  1. I did manage to fix it before you did submit:)

USYNC_THREAD

usr/src/cmd/rcm_daemon/common/ip_rcm.c (Diff revision 1)
 
 

USYNC_THREAD

USYNC_THREAD

Andy Fiddaman
Ship It!
Loading...