Project

General

Profile

Bug #11350

isns: NULL pointer errors

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

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

100%

Estimated time:
Difficulty:
Medium
Tags:

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 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

History

#1

Updated by Electric Monk 3 months ago

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

git commit d21f0ec32d7dd9a0641312159d9c22ab2bd0ad7f

commit  d21f0ec32d7dd9a0641312159d9c22ab2bd0ad7f
Author: Toomas Soome <tsoome@me.com>
Date:   2019-07-12T06:17:14.000Z

    11350 isns: NULL pointer errors
    Reviewed by: Garrett D'Amore <garrett@damore.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF