11291 bnu: NULL pointer errors

Review Request #2037 - Created July 1, 2019 and submitted

Information
Toomas Soome
illumos-gate
11291
985a150...
Reviewers
general
uustat.c: In function 'main':
uustat.c:450:46: error: comparison between pointer and integer [-Werror]
      for((sortcnt = 0, m = &M[0]);*(m->mach) != NULL;(sortcnt++,m++))
                                              ^~

uudecode.c: In function 'decode':
uudecode.c:359:32: error: comparison between pointer and integer [-Werror]
    while ((curchr = *(iptr++)) != NULL) {
                                ^~

getprm.c: In function 'split':
getprm.c:238:19: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
   tmpbuf[cr-cl-1] = NULL;
                   ^

sysfiles.c: In function 'getsysline':
sysfiles.c:483:34: error: comparison between pointer and integer [-Werror]
   while (getaline(fsystems, buf) != NULL)
                                  ^~

gio.c: In function 'gturnon':
gio.c:75:15: error: comparison between pointer and integer [-Werror]
  if ((int) Pk == NULL)
               ^~

In file included from /code/illumos-gate/proto/root_i386/usr/include/unistd.h:40:0,
                 from uucp.h:40,
                 from interface.c:36:
interface.c: In function 'twrite':
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 4 of 't_snd' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
interface.c:305:34: note: in expansion of macro 'NULL'
   return (t_snd(fd, buf, nbytes, NULL));
                                  ^~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/tiuser.h:36:0,
                 from interface.c:39:
/code/illumos-gate/proto/root_i386/usr/include/sys/tiuser.h:219:12: note: expected 'int' but argument is of type 'void *'
 extern int t_snd(int fildes, char *buf, unsigned nbytes, int flags);
            ^~~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/unistd.h:40:0,
                 from uucp.h:40,
                 from interface.c:36:
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 4 of 't_snd' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
interface.c:311:45: note: in expansion of macro 'NULL'
   if ((ret = t_snd(fd,  &buf[i], info.tsdu, NULL)) != info.tsdu)
                                             ^~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/tiuser.h:36:0,
                 from interface.c:39:
/code/illumos-gate/proto/root_i386/usr/include/sys/tiuser.h:219:12: note: expected 'int' but argument is of type 'void *'
 extern int t_snd(int fildes, char *buf, unsigned nbytes, int flags);
            ^~~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/unistd.h:40:0,
                 from uucp.h:40,
                 from interface.c:36:
/code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 4 of 't_snd' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
interface.c:317:42: note: in expansion of macro 'NULL'
   if ((ret = t_snd(fd,  &buf[i], nbytes, NULL)) != nbytes)
                                          ^~~~
In file included from /code/illumos-gate/proto/root_i386/usr/include/tiuser.h:36:0,
                 from interface.c:39:
/code/illumos-gate/proto/root_i386/usr/include/sys/tiuser.h:219:12: note: expected 'int' but argument is of type 'void *'
 extern int t_snd(int fildes, char *buf, unsigned nbytes, int flags);
            ^~~~~
cc1: all warnings being treated as errors

  
Andrew Stormont
Toomas Soome
Review request changed

Status: Closed (submitted)

Loading...