Project

General

Profile

Bug #11291

bnu: 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:

    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

History

#1

Updated by Electric Monk 3 months ago

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

git commit 09f57adea580808a172a5b3e84bf41dc7e0cee6d

commit  09f57adea580808a172a5b3e84bf41dc7e0cee6d
Author: Toomas Soome <tsoome@me.com>
Date:   2019-07-05T20:00:26.000Z

    11291 bnu: NULL pointer errors
    Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
    Approved by: Garrett D'Amore <garrett@damore.org>

Also available in: Atom PDF