11350 isns: NULL pointer errors

Review Request #2086 - Created July 6, 2019 and submitted

Information
Toomas Soome
illumos-gate
11350
d8e873d...
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 func.c:27:
func.c: In function 'dev_attr_reg':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
func.c:644:25: note: in expansion of macro 'NULL'
  isns_attr_t pgt[3] = { NULL };
                         ^~~~
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'pgt[0].tag')
 #define NULL ((void *)0)
              ^
func.c:644:25: note: in expansion of macro 'NULL'
  isns_attr_t pgt[3] = { NULL };
                         ^~~~

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 cache.c:27:
cache.c: In function 'cache_init':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'rwlock_init' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
cache.c:89:30: note: in expansion of macro 'NULL'
  (void) rwlock_init(&imc->l, NULL, NULL);
                              ^~~~
In file included from isns_cache.h:30:0,
                 from cache.c:32:
/code/illumos-gate/proto/root_i386/usr/include/synch.h:115:5: note: expected 'int' but argument is of type 'void *'
 int rwlock_init(rwlock_t *, int, void *);
     ^~~~~~~~~~~
cc1: all warnings being treated as errors

  
Garrett D'Amore
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...