11318 svc: NULL pointer errors

Review Request #2055 - Created July 4, 2019 and submitted

Information
Toomas Soome
illumos-gate
11318
b367636...
Reviewers
general
restarter.c: In function 'refresh_instance':
restarter.c:1741:19: error: incompatible types when assigning to type 'restarter_str_t {aka enum <anonymous>}' from type 'void *'
   info->sf_reason = 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 /code/illumos-gate/proto/root_i386/usr/include/libsysevent.h:28,
                 from protocol.c:48:
protocol.c: In function 'graph_protocol_init':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'startd_list_create' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
protocol.c:92:52: note: in expansion of macro 'NULL'
      graph_protocol_event_queue_pool, graph_queue, NULL);
                                                    ^~~~
In file included from protocol.h:28:0,
                 from protocol.c:60:
./startd.h:749:12: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
 uu_list_t *startd_list_create(uu_list_pool_t *, void *, uint32_t);
            ^~~~~~~~~~~~~~~~~~
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 /code/illumos-gate/proto/root_i386/usr/include/libsysevent.h:28,
                 from protocol.c:48:
protocol.c: In function 'restarter_protocol_init':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'startd_list_create' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
protocol.c:207:60: note: in expansion of macro 'NULL'
      restarter_protocol_event_queue_pool, restarter_queue, NULL);
                                                            ^~~~
In file included from protocol.h:28:0,
                 from protocol.c:60:
./startd.h:749:12: note: expected 'uint32_t {aka unsigned int}' but argument is of type 'void *'
 uu_list_t *startd_list_create(uu_list_pool_t *, void *, uint32_t);
            ^~~~~~~~~~~~~~~~~~

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/sys/contract.h:29,
                 from /code/illumos-gate/proto/root_i386/usr/include/sys/contract/process.h:31,
                 from method.c:48:
method.c: In function 'method_run':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'waitpid' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
method.c:951:34: note: in expansion of macro 'NULL'
    r = waitpid(pid, &ret_status, NULL);
                                  ^~~~
In file included from method.c:54:0:
/code/illumos-gate/proto/root_i386/usr/include/sys/wait.h:99:14: note: expected 'int' but argument is of type 'void *'
 extern pid_t waitpid(pid_t, int *, int);
              ^~~~~~~

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 startd.c:198:
startd.c: In function 'read_startd_config':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 8 of 'scf_handle_decode_fmri' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
startd.c:600:24: note: in expansion of macro 'NULL'
      NULL, NULL, prop, NULL) != -1 &&
                        ^~~~
In file included from startd.c:211:0:
/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 *,
     ^~~~~~~~~~~~~~~~~~~~~~

graph.c: In function 'do_uadmin':
graph.c:3564:7: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
  mdep = NULL;
       ^

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 svcs.h:32,
                 from svcs.c:51:
svcs.c: In function 'get_restarter_time_prop':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 6 of 'inst_get_single_val' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
svcs.c:557:11: note: in expansion of macro 'NULL'
      tvp, NULL, ok_if_empty ? EMPTY_OK : 0, 0, 1);
           ^~~~
svcs.c:501:1: note: expected 'size_t {aka unsigned int}' but argument is of type 'void *'
 inst_get_single_val(scf_instance_t *inst, const char *pgname,
 ^~~~~~~~~~~~~~~~~~~
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 svcs.h:32,
                 from svcs.c:51:
svcs.c: In function 'sprint_stime':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 5 of 'pg_get_single_val' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
svcs.c:1654:27: note: in expansion of macro 'NULL'
       SCF_TYPE_TIME, &tv, NULL, 0);
                           ^~~~
svcs.c:360:1: note: expected 'size_t {aka unsigned int}' but argument is of type 'void *'
 pg_get_single_val(scf_propertygroup_t *pg, const char *propname, scf_type_t ty,
 ^~~~~~~~~~~~~~~~~
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 svcs.h:32,
                 from svcs.c:51:
svcs.c: In function 'sortkey_stime':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 5 of 'pg_get_single_val' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
svcs.c:1706:27: note: in expansion of macro 'NULL'
       SCF_TYPE_TIME, &tv, NULL, 0);
                           ^~~~
svcs.c:360:1: note: expected 'size_t {aka unsigned int}' but argument is of type 'void *'
 pg_get_single_val(scf_propertygroup_t *pg, const char *propname, scf_type_t ty,
 ^~~~~~~~~~~~~~~~~
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 svcs.h:32,
                 from svcs.c:51:
svcs.c: In function 'print_detailed':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 5 of 'pg_get_single_val' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
svcs.c:2520:27: note: in expansion of macro 'NULL'
       SCF_TYPE_TIME, &tv, NULL, 0) == 0) {
                           ^~~~
svcs.c:360:1: note: expected 'size_t {aka unsigned int}' but argument is of type 'void *'
 pg_get_single_val(scf_propertygroup_t *pg, const char *propname, scf_type_t ty,
 ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

  
C Fraire
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...