Project

General

Profile

Bug #11420

rpcbind: NULL pointer errors

Added by Toomas Soome about 1 month ago. Updated 22 days 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:

    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

History

#1

Updated by Electric Monk 22 days ago

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

git commit 053601185d4f955b8a517694e8469c12a90c9c7b

commit  053601185d4f955b8a517694e8469c12a90c9c7b
Author: Toomas Soome <tsoome@me.com>
Date:   2019-07-30T18:24:18.000Z

    11420 rpcbind: NULL pointer errors
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF