Project

General

Profile

Bug #11436

tip: NULL pointer errors

Added by Toomas Soome 5 days ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
Due date:
% Done:

90%

Estimated time:
Difficulty:
Medium
Tags:

Description

Build errors with NULL pointer:

    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 tip.h:20,
                     from vars.c:14:
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    vars.c:88:11: note: in expansion of macro 'NULL'
      { NOSTR, NULL, NULL, NOSTR, NOSTR }
               ^~~~
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'vtable[34].v_type')
     #define NULL ((void *)0)
                  ^
    vars.c:88:11: note: in expansion of macro 'NULL'
      { NOSTR, NULL, NULL, NOSTR, NOSTR }
               ^~~~
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    vars.c:88:17: note: in expansion of macro 'NULL'
      { NOSTR, NULL, NULL, NOSTR, NOSTR }
                     ^~~~
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'vtable[34].v_access')
     #define NULL ((void *)0)
                  ^
    vars.c:88:17: note: in expansion of macro 'NULL'
      { NOSTR, NULL, NULL, NOSTR, NOSTR }
                     ^~~~

    tip.c: In function 'main':
    tip.c:164:43: error: comparison between pointer and integer [-Werror]
      if ((i = speed(number(value(BAUDRATE)))) == NULL) {
                                               ^~
    cc1: all warnings being treated as errors

Also available in: Atom PDF