Project

General

Profile

Bug #11143

libscf: NULL pointer errors

Added by Toomas Soome 5 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

NULL pointer errors:

    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stddef_iso.h:53:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/stddef.h:35,
                     from /code/illumos-gate/proto/root_i386/usr/include/libscf.h:31,
                     from ../common/libscf_impl.h:30,
                     from ../common/highlevel.c:31:
    ../common/highlevel.c: In function 'scf_default_secflags':
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:32:14: error: passing argument 8 of 'scf_handle_decode_fmri' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/highlevel.c:415:38: note: in expansion of macro 'NULL'
            NULL, NULL, NULL, NULL, prop, NULL) != 0)
                                          ^~~~
    In file included from ../common/libscf_impl.h:30:0,
                     from ../common/highlevel.c:31:
    /code/illumos-gate/proto/root_i386/usr/include/libscf.h:690:5: note: expected 'int' but argument is of type 'void *'
     int scf_handle_decode_fmri(scf_handle_t *, const char *, scf_scope_t *,
         ^~~~~~~~~~~~~~~~~~~~~~

    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stddef_iso.h:53:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/stddef.h:35,
                     from ../inc/libscf.h:31,
                     from ../common/libscf_impl.h:30,
                     from ../common/midlevel.c:28:
    ../common/midlevel.c: In function 'scf_general_pg_setup':
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:32:14: error: passing argument 8 of 'scf_handle_decode_fmri' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../common/midlevel.c:1346:18: note: in expansion of macro 'NULL'
          NULL, NULL, NULL) == -1) {
                      ^~~~
    In file included from ../common/libscf_impl.h:30:0,
                     from ../common/midlevel.c:28:
    ../inc/libscf.h:690:5: note: expected 'int' but argument is of type 'void *'
     int scf_handle_decode_fmri(scf_handle_t *, const char *, scf_scope_t *,
         ^~~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk 4 months ago

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

git commit 4a014300cea3d870431d7e52aff6781d3c63e5d1

commit  4a014300cea3d870431d7e52aff6781d3c63e5d1
Author: Toomas Soome <tsoome@me.com>
Date:   2019-06-24T20:02:46.000Z

    11143 libscf: NULL pointer errors
    Reviewed by: John Levon <john.levon@joyent.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF