11420 rpcbind: NULL pointer errors

Review Request #2140 - Created July 11, 2019 and updated

Information
Toomas Soome
illumos-gate
11420
5b4be6d...
Reviewers
general
rpcbind.c: In function 'main':
rpcbind.c:326:22: error: comparison between pointer and integer [-Werror]
  if ((loopback_dg[0] == NULL) && (loopback_vc[0] == NULL) &&
                      ^~
rpcbind.c:326:50: error: comparison between pointer and integer [-Werror]
  if ((loopback_dg[0] == NULL) && (loopback_vc[0] == NULL) &&
                                                  ^~
rpcbind.c:327:26: error: comparison between pointer and integer [-Werror]
      (loopback_vc_ord[0] == NULL)) {
                          ^~
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/dlfcn.h:34,
                 from rpcbind.c:96:
rpcbind.c: In function 'init_transport':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 5 of 'svc_register' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
rpcbind.c:620:21: note: in expansion of macro 'NULL'
       pmap_service, NULL)) {
                     ^~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/rpc/svc.h:1055:0,
                 from /code/illumos-gate/proto/root_i386/usr/include/rpc/rpc.h:68,
                 from rpcbind.c:103:
/code/illumos-gate/proto/root_i386/usr/include/rpc/svc_soc.h:68:15: note: expected 'int' but argument is of type 'void *'
 extern bool_t svc_register(SVCXPRT *, rpcprog_t, rpcvers_t,
               ^~~~~~~~~~~~

rpcb_stat.c: In function 'rpcbs_getaddr':
rpcb_stat.c:114:37: error: comparison between pointer and integer [-Werror]
    if ((uaddr == NULL) || (uaddr[0] == NULL))
                                     ^~
rpcb_stat.c:141:35: error: comparison between pointer and integer [-Werror]
  if ((uaddr == NULL) || (uaddr[0] == NULL)) {
                                   ^~
rpcb_stat.c:157:37: error: comparison between pointer and integer [-Werror]
    if ((uaddr == NULL) || (uaddr[0] == NULL))
                                     ^~
cc1: all warnings being treated as errors

  
Andy Fiddaman
Ship It!
Loading...