Project

General

Profile

Actions

Bug #10738

closed

sockfs: NULL pointer errors

Added by Toomas Soome about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
filesystems (not ZFS)
Start date:
2019-04-11
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

NULL pointer errors:

    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/sysmacros.h:37,
                     from ../../common/fs/sockfs/nl7chttp.c:26:
    ../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ./nl7ctokgen.h:88:3: note: in expansion of macro 'NULL'
      {NULL}
       ^~~~
    ../../common/sys/null.h:32:14: note: (near initialization for 'tokreq[16].tokid')
     #define NULL ((void *)0)
                  ^
    ./nl7ctokgen.h:88:3: note: in expansion of macro 'NULL'
      {NULL}
       ^~~~
    ../../common/sys/null.h:32:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ./nl7ctokgen.h:110:3: note: in expansion of macro 'NULL'
      {NULL}
       ^~~~
    ../../common/sys/null.h:32:14: note: (near initialization for 'tokres[15].tokid')
     #define NULL ((void *)0)
                  ^
    ./nl7ctokgen.h:110:3: note: in expansion of macro 'NULL'
      {NULL}
       ^~~~

    ../../common/fs/sockfs/nl7c.c: In function 'atou':
    ../../common/fs/sockfs/nl7c.c:282:20: error: comparison between pointer and integer [-Werror]
      while ((c = *p++) != NULL && isdigit(c)) {
                        ^~
    ../../common/fs/sockfs/nl7c.c: In function 'ncaportconf_read':
    ../../common/fs/sockfs/nl7c.c:420:14: error: comparison between pointer and integer [-Werror]
         if (*tok != NULL) {
                  ^~
    ../../common/fs/sockfs/nl7c.c:438:14: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
         *stringp = NULL;
                  ^
    ../../common/fs/sockfs/nl7c.c:473:14: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
         *stringp = NULL;
                  ^
    ../../common/fs/sockfs/nl7c.c: In function 'ncakmodconf_read':
    ../../common/fs/sockfs/nl7c.c:585:14: error: comparison between pointer and integer [-Werror]
         if (*tok == NULL) {
                  ^~
    ../../common/fs/sockfs/nl7c.c: In function 'ncalogdconf_read':
    ../../common/fs/sockfs/nl7c.c:724:43: error: comparison between pointer and integer [-Werror]
         if (tokstatusp != NULL && *tokstatusp == NULL)
                                               ^~
    ../../common/fs/sockfs/nl7c.c:726:44: error: comparison between pointer and integer [-Werror]
         else if (toksizep != NULL && *toksizep == NULL)
                                                ^~
    ../../common/fs/sockfs/nl7c.c:728:44: error: comparison between pointer and integer [-Werror]
         else if (tokfilep != NULL && *tokfilep == NULL)
                                                ^~
    ../../common/fs/sockfs/nl7c.c:749:24: error: comparison between pointer and integer [-Werror]
          if (*++tokstatusp == NULL)
                            ^~
    ../../common/fs/sockfs/nl7c.c:764:39: error: comparison between pointer and integer [-Werror]
         if (! isalpha(c) || *++tokstatusp == NULL ||
                                           ^~

    ../../common/fs/sockfs/nl7curi.c: In function 'uri_lookup':
    ../../common/fs/sockfs/nl7curi.c:929:32: error: wrong type argument to bit-complement
      ruri->proc = (struct sonode *)~NULL;
                                    ^

    ../../common/fs/sockfs/socktpi.c: In function 'socktpi_plumbioctl':
    ../../common/fs/sockfs/socktpi.c:6204:11: error: comparison between pointer and integer [-Werror]
       if (arg == NULL) {
               ^~
    cc1: all warnings being treated as errors

Actions #1

Updated by Electric Monk about 3 years ago

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

git commit e9f74ea56f674c729c7fa4812e7fc668a9c24070

commit  e9f74ea56f674c729c7fa4812e7fc668a9c24070
Author: Toomas Soome <tsoome@me.com>
Date:   2019-04-24T06:46:32.000Z

    10738 sockfs: NULL pointer errors
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF