10738 sockfs: NULL pointer errors

Review Request #1704 — Created April 11, 2019 and submitted

tsoome
illumos-gate
10738
cf19d38...
general
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


  • 0
  • 0
  • 1
  • 1
  • 2
Description From Last Updated
rm
  1. 
      
  2. usr/src/uts/common/fs/sockfs/nl7c.c (Diff revision 1)
     
     
    It looks like the prior function only operated in base 10. Should we specify the base to make sure that we don't change the behavior?
  3. 
      
tsoome
rm
  1. Ship It!
  2. 
      
citrus
  1. 
      
  2. usr/src/uts/common/fs/sockfs/nl7curi.c (Diff revision 2)
     
     

    What's going on here? Should it not just be (struct sonode *)NULL;?

  3. 
      
citrus
  1. Ship It!
  2. 
      
tsoome
tsoome
Review request changed

Status: Closed (submitted)

Loading...