11143 libscf: NULL pointer errors

Review Request #1928 - Created June 1, 2019 and updated

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

  
John Levon
Ship It!
Loading...