Project

General

Profile

Bug #11415

rcap: NULL pointer errors

Added by Toomas Soome 3 months ago. Updated 3 months 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:

    rcapd_scanner.c: In function 'advance_prpageheader_cur_nextmapping':
    rcapd_scanner.c:246:10: error: return makes integer from pointer without a cast [-Werror=int-conversion]
       return (NULL);
              ^
    rcapd_scanner.c: In function 'OR_pagedata':
    rcapd_scanner.c:432:18: error: comparison between pointer and integer [-Werror]
      while (src_addr != NULL && dst_addr != NULL) {
                      ^~
    rcapd_scanner.c:432:38: error: comparison between pointer and integer [-Werror]
      while (src_addr != NULL && dst_addr != NULL) {
                                          ^~
    rcapd_scanner.c:433:43: error: comparison between pointer and integer [-Werror]
       while (src_addr == dst_addr && src_addr != NULL) {
                                               ^~
    rcapd_scanner.c:445:43: error: comparison between pointer and integer [-Werror]
       while (src_addr != dst_addr && src_addr != NULL && dst_addr !=
                                               ^~
    rcapd_scanner.c:445:63: error: comparison between pointer and integer [-Werror]
       while (src_addr != dst_addr && src_addr != NULL && dst_addr !=
                                                                   ^~
    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/mman.h:54,
                     from rcapd_scanner.c:28:
    rcapd_scanner.c: In function 'scan_abort':
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'Prelease' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    rcapd_scanner.c:994:28: note: in expansion of macro 'NULL'
       (void) Prelease(scan_pr, NULL);
                                ^~~~
    In file included from rcapd_scanner.c:35:0:
    /code/illumos-gate/proto/root_i386/usr/include/libproc.h:251:13: note: expected 'int' but argument is of type 'void *'
     extern void Prelease(struct ps_prochandle *, int);
                 ^~~~~~~~
    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk 3 months ago

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

git commit ec3255b6c7ec65bcbd5a7bbd2c0e9df7437b8f54

commit  ec3255b6c7ec65bcbd5a7bbd2c0e9df7437b8f54
Author: Toomas Soome <tsoome@me.com>
Date:   2019-07-26T05:49:58.000Z

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

Also available in: Atom PDF