Project

General

Profile

Bug #11296

cmd-inet: NULL pointer errors

Added by Toomas Soome 4 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:

    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 /code/illumos-gate/proto/root_i386/usr/include/sys/param.h:44,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/sysmacros.h:37,
                     from kssladm_create.c:27:
    kssladm_create.c: In function 'kmf_to_kssl':
    /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)
                  ^
    kssladm_create.c:111:21: note: in expansion of macro 'NULL'
       {SUN_CKA_MODULUS, NULL, 0},
                         ^~~~
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'kssl_tmpl_attrs[0].ka_value_offset')
     #define NULL ((void *)0)
                  ^
    kssladm_create.c:111:21: note: in expansion of macro 'NULL'
       {SUN_CKA_MODULUS, NULL, 0},
                         ^~~~
    /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)
                  ^
    kssladm_create.c:112:29: note: in expansion of macro 'NULL'
       {SUN_CKA_PUBLIC_EXPONENT, NULL, 0},
                                 ^~~~
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'kssl_tmpl_attrs[1].ka_value_offset')
     #define NULL ((void *)0)
                  ^
    kssladm_create.c:112:29: note: in expansion of macro 'NULL'
       {SUN_CKA_PUBLIC_EXPONENT, NULL, 0},
                                 ^~~~
    /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)
                  ^
    kssladm_create.c:113:30: note: in expansion of macro 'NULL'
       {SUN_CKA_PRIVATE_EXPONENT, NULL, 0},
                                  ^~~~
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'kssl_tmpl_attrs[2].ka_value_offset')
     #define NULL ((void *)0)
                  ^
    kssladm_create.c:113:30: note: in expansion of macro 'NULL'
       {SUN_CKA_PRIVATE_EXPONENT, NULL, 0},
                                  ^~~~
    /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)
                  ^
    kssladm_create.c:114:21: note: in expansion of macro 'NULL'
       {SUN_CKA_PRIME_1, NULL, 0},
                         ^~~~
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'kssl_tmpl_attrs[3].ka_value_offset')
     #define NULL ((void *)0)
                  ^
    kssladm_create.c:114:21: note: in expansion of macro 'NULL'
       {SUN_CKA_PRIME_1, NULL, 0},
                         ^~~~
    /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)
                  ^
    kssladm_create.c:115:21: note: in expansion of macro 'NULL'
       {SUN_CKA_PRIME_2, NULL, 0},
                         ^~~~
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'kssl_tmpl_attrs[4].ka_value_offset')
     #define NULL ((void *)0)
                  ^
    kssladm_create.c:115:21: note: in expansion of macro 'NULL'
       {SUN_CKA_PRIME_2, NULL, 0},
                         ^~~~
    /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)
                  ^
    kssladm_create.c:116:24: note: in expansion of macro 'NULL'
       {SUN_CKA_EXPONENT_1, NULL, 0},
                            ^~~~
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'kssl_tmpl_attrs[5].ka_value_offset')
     #define NULL ((void *)0)
                  ^
    kssladm_create.c:116:24: note: in expansion of macro 'NULL'
       {SUN_CKA_EXPONENT_1, NULL, 0},
                            ^~~~
    /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)
                  ^
    kssladm_create.c:117:24: note: in expansion of macro 'NULL'
       {SUN_CKA_EXPONENT_2, NULL, 0},
                            ^~~~
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'kssl_tmpl_attrs[6].ka_value_offset')
     #define NULL ((void *)0)
                  ^
    kssladm_create.c:117:24: note: in expansion of macro 'NULL'
       {SUN_CKA_EXPONENT_2, NULL, 0},
                            ^~~~
    /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)
                  ^
    kssladm_create.c:118:25: note: in expansion of macro 'NULL'
       {SUN_CKA_COEFFICIENT, NULL, 0}
                             ^~~~
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'kssl_tmpl_attrs[7].ka_value_offset')
     #define NULL ((void *)0)
                  ^
    kssladm_create.c:118:25: note: in expansion of macro 'NULL'
       {SUN_CKA_COEFFICIENT, NULL, 0}
                             ^~~~

    snoop_rport.c: In function 'reservedport':
    snoop_rport.c:167:18: error: return makes integer from pointer without a cast [-Werror=int-conversion]
      default: return (NULL);
                      ^
    nfs4_xdr.c: In function 'xdr_entry4':
    nfs4_xdr.c:1994:12: error: return makes integer from pointer without a cast [-Werror=int-conversion]
         return (NULL);
                ^

    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_i
    so.h:53:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82,
                     from snoop_ether.c:26:
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: initiali
    zation makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    snoop_ether.c:101:28: note: in expansion of macro 'NULL'
      { (uint_t)-1, 0, 0, 0, 0, NULL, NULL, B_FALSE }
                                ^~~~
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near ini
    tialization for 'INTERFACES[9].network_type_ipv6')
     #define NULL ((void *)0)
                  ^
    snoop_ether.c:101:28: note: in expansion of macro 'NULL'
      { (uint_t)-1, 0, 0, 0, 0, NULL, NULL, B_FALSE }
                                ^~~~

    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 /code/illumos-gate/proto/root_i386/usr/include/sys/siginfo.h:34,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/signal.h:59,
                     from /code/illumos-gate/proto/root_i386/usr/include/thread.h:41,
                     from in.rarpd.c:40:
    in.rarpd.c: In function 'main':
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'thr_create' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    in.rarpd.c:274:26: note: in expansion of macro 'NULL'
      (void) thr_create(NULL, NULL, (void *(*)(void *))do_delay_write, NULL,
                              ^~~~
    In file included from in.rarpd.c:40:0:
    /code/illumos-gate/proto/root_i386/usr/include/thread.h:54:12: note: expected 's
    ize_t {aka unsigned int}' but argument is of type 'void *'
     extern int thr_create(void *, size_t, void *(*)(void *), void *, long,
                ^~~~~~~~~~
    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 /code/illumos-gate/proto/root_i386/usr/include/sys/siginfo.h:34,
                     from /code/illumos-gate/proto/root_i386/usr/include/sys/signal.h:59,
                     from /code/illumos-gate/proto/root_i386/usr/include/thread.h:41,
                     from in.rarpd.c:40:
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'thr_create' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    in.rarpd.c:282:28: note: in expansion of macro 'NULL'
        (void) thr_create(NULL, NULL,
                                ^~~~
    In file included from in.rarpd.c:40:0:
    /code/illumos-gate/proto/root_i386/usr/include/thread.h:54:12: note: expected 'size_t {aka unsigned int}' but argument is of type 'void *'
     extern int thr_create(void *, size_t, void *(*)(void *), void *, long,
                ^~~~~~~~~~
    hostconfig.c: In function 'bpanswer':
    hostconfig.c:382:10: error: return makes integer from pointer without a cast [-Werror=int-conversion]
       return (NULL);
              ^

    ifparse.c: In function 'ifparse':
    ifparse.c:438:32: error: comparison between pointer and integer [-Werror]
       if ((parsemode & PARSEFIXED) != NULL) {
                                    ^~
    soconfig.c: In function 'split_line':
    soconfig.c:271:7: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       *cp = NULL;
           ^
    soconfig.c:276:34: error: comparison between pointer and integer [-Werror]
       while (isspace(*line) && *line != NULL)
                                      ^~
    soconfig.c:283:13: error: comparison between pointer and integer [-Werror]
       if (*line == NULL)
                 ^~
    soconfig.c:287:35: error: comparison between pointer and integer [-Werror]
       while (!isspace(*line) && *line != NULL)
                                       ^~
    soconfig.c:289:13: error: comparison between pointer and integer [-Werror]
       if (*line != NULL) {
                 ^~
    soconfig.c:291:12: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
        *line++ = NULL;
                ^

    In file included from /code/illumos-gate/proto/root_i386/usr/include/unistd.h:40:0,
                     from ikeadm.c:24:
    /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)
                  ^
    ikeadm.c:738:3: note: in expansion of macro 'NULL'
      {NULL, 0}
       ^~~~
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'idtypes[25].kw_tag')
     #define NULL ((void *)0)
                  ^
    ikeadm.c:738:3: note: in expansion of macro 'NULL'
      {NULL, 0}
       ^~~~
    /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)
                  ^
    ikeadm.c:906:3: note: in expansion of macro 'NULL'
      {NULL, 0}
       ^~~~
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'psfldtypes[6].kw_tag')
     #define NULL ((void *)0)
                  ^
    ikeadm.c:906:3: note: in expansion of macro 'NULL'
      {NULL, 0}
       ^~~~
    /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)
                  ^
    ikeadm.c:932:3: note: in expansion of macro 'NULL'
      {NULL, 0}
       ^~~~
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'ikemodes[3].kw_tag')
     #define NULL ((void *)0)
                  ^
    ikeadm.c:932:3: note: in expansion of macro 'NULL'
      {NULL, 0}
       ^~~~
    ikeadm.c: In function 'parseit':
    ikeadm.c:3351:12: error: comparison between pointer and integer [-Werror]
       if (argc != NULL) {
                ^~

    nwamcfg.c: In function 'cmd_cpl_fn':
    nwamcfg.c:606:9: error: return makes integer from pointer without a cast [-Werror=int-conversion]
      return (NULL);
             ^

    encrypt.c: In function 'findencryption':
    encrypt.c:145:19: error: comparison between pointer and integer [-Werror]
      for (; (ep->type != NULL) && (ep->type != type); ep++);
                       ^~

    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdlib_iso.h:50:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/stdlib.h:37,
                     from /code/illumos-gate/usr/src/uts/common/gssapi/mechs/krb5/include/krb5.h:108,
                     from enc_des.c:76:
    enc_des.c: In function 'ecb_encrypt':
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 3 of 'krb5_c_encrypt' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    enc_des.c:129:55: note: in expansion of macro 'NULL'
      code = krb5_c_encrypt(telnet_context, &stp->str_key, NULL, NULL,
                                                           ^~~~
    In file included from enc_des.c:76:0:
    /code/illumos-gate/usr/src/uts/common/gssapi/mechs/krb5/include/krb5.h:522:5: note: expected 'krb5_keyusage {aka int}' but argument is of type 'void *'
         krb5_c_encrypt
         ^~~~~~~~~~~~~~

    kerberos5.c: In function 'kerberos5_send':
    kerberos5.c:258:19: error: comparison between pointer and integer [-Werror]
       &creds.client)) != NULL) {
                       ^~
    kerberos5.c:381:31: error: comparison between pointer and integer [-Werror]
       strlen(UserNameRequested))) == NULL) {
                                   ^~

    telnet.c: In function 'mklist':
    telnet.c:665:33: error: comparison between pointer and integer [-Werror]
      for (cp = cp2 = buf; (c = *cp) != NULL;  cp++) {
                                     ^~
    telnet.c: In function 'env_opt_add':
    telnet.c:1676:22: error: comparison between pointer and integer [-Werror]
       while ((c = *ep++) != NULL) {
                          ^~

    unix.c: In function 'nextstr':
    unix.c:238:43: error: comparison between pointer and integer [-Werror]
      for (next = &pas[strlen(pas) + 1]; *next == NULL; ) {
                                               ^~

    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/locale_iso.h:50:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/locale.h:41,
                     from inetadm.c:32:
    inetadm.c: In function 'modify_inst_props_cb':
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 4 of 'uu_strtoint' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    inetadm.c:813:55: note: in expansion of macro 'NULL'
        if (uu_strtoint(value, &new_int, sizeof (new_int), NULL,
                                                           ^~~~
    In file included from inetadm.c:36:0:
    /code/illumos-gate/proto/root_i386/usr/include/libuutil.h:107:12: note: expected 'int' but argument is of type 'void *'
     extern int uu_strtoint(const char *, void *, size_t, int, int64_t, int64_t);
                ^~~~~~~~~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/locale_iso.h:50:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/locale.h:41,
                     from inetadm.c:32:
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 5 of 'uu_strtoint' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    inetadm.c:814:8: note: in expansion of macro 'NULL'
            NULL, NULL) == -1)
            ^~~~
    In file included from inetadm.c:36:0:
    /code/illumos-gate/proto/root_i386/usr/include/libuutil.h:107:12: note: expected 'int64_t {aka long long int}' but argument is of type 'void *'
     extern int uu_strtoint(const char *, void *, size_t, int, int64_t, int64_t);
                ^~~~~~~~~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/locale_iso.h:50:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/locale.h:41,
                     from inetadm.c:32:
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 6 of 'uu_strtoint' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    inetadm.c:814:14: note: in expansion of macro 'NULL'
            NULL, NULL) == -1)
                  ^~~~
    In file included from inetadm.c:36:0:
    /code/illumos-gate/proto/root_i386/usr/include/libuutil.h:107:12: note: expected 'int64_t {aka long long int}' but argument is of type 'void *'
     extern int uu_strtoint(const char *, void *, size_t, int, int64_t, int64_t);
                ^~~~~~~~~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/locale_iso.h:50:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/locale.h:41,
                     from inetadm.c:32:
    inetadm.c: In function 'modify_defaults':
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 4 of 'uu_strtoint' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    inetadm.c:941:55: note: in expansion of macro 'NULL'
        if (uu_strtoint(value, &new_int, sizeof (new_int), NULL,
                                                           ^~~~
    In file included from inetadm.c:36:0:
    /code/illumos-gate/proto/root_i386/usr/include/libuutil.h:107:12: note: expected 'int' but argument is of type 'void *'
     extern int uu_strtoint(const char *, void *, size_t, int, int64_t, int64_t);
                ^~~~~~~~~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/locale_iso.h:50:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/locale.h:41,
                     from inetadm.c:32:
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 5 of 'uu_strtoint' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    inetadm.c:942:8: note: in expansion of macro 'NULL'
            NULL, NULL) == -1)
            ^~~~
    In file included from inetadm.c:36:0:
    /code/illumos-gate/proto/root_i386/usr/include/libuutil.h:107:12: note: expected 'int64_t {aka long long int}' but argument is of type 'void *'
     extern int uu_strtoint(const char *, void *, size_t, int, int64_t, int64_t);
                ^~~~~~~~~~~
    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/locale_iso.h:50:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/locale.h:41,
                     from inetadm.c:32:
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 6 of 'uu_strtoint' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    inetadm.c:942:14: note: in expansion of macro 'NULL'
            NULL, NULL) == -1)
                  ^~~~
    In file included from inetadm.c:36:0:
    /code/illumos-gate/proto/root_i386/usr/include/libuutil.h:107:12: note: expected 'int64_t {aka long long int}' but argument is of type 'void *'
     extern int uu_strtoint(const char *, void *, size_t, int, int64_t, int64_t);
                ^~~~~~~~~~~

    netstat.c: In function 'dhcp_walk_interfaces':
    netstat.c:3520:11: error: incompatible types when returning type 'void *' but 'boolean_t {aka enum <anonymous>}' was expected
        return (NULL);
               ^

    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdlib_iso.h:50:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/stdlib.h:37,
                     from config.c:32:
    /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)
                  ^
    config.c:51:58: note: in expansion of macro 'NULL'
     {PR_EXEC_NAME, "", INET_TYPE_STRING, B_FALSE, IVE_UNSET, NULL, B_FALSE},
                                                              ^~~~
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'method_props[0].ip_value.iv_int')
     #define NULL ((void *)0)
                  ^
    config.c:51:58: note: in expansion of macro 'NULL'
     {PR_EXEC_NAME, "", INET_TYPE_STRING, B_FALSE, IVE_UNSET, NULL, B_FALSE},
                                                              ^~~~
    /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)
                  ^
    config.c:52:57: note: in expansion of macro 'NULL'
     {PR_ARG0_NAME, "", INET_TYPE_STRING, B_TRUE, IVE_UNSET, NULL, B_FALSE},
                                                             ^~~~
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'method_props[1].ip_value.iv_int')
     #define NULL ((void *)0)
                  ^
    config.c:52:57: note: in expansion of macro 'NULL'
     {PR_ARG0_NAME, "", INET_TYPE_STRING, B_TRUE, IVE_UNSET, NULL, B_FALSE},
                                                             ^~~~
    /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)
                  ^
    config.c:53:64: note: in expansion of macro 'NULL'
     {SCF_PROPERTY_TIMEOUT, "", INET_TYPE_COUNT, B_TRUE, IVE_UNSET, NULL, B_FALSE},
                                                                    ^~~~
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'method_props[2].ip_value.iv_int')
     #define NULL ((void *)0)
                  ^
    config.c:53:64: note: in expansion of macro 'NULL'
     {SCF_PROPERTY_TIMEOUT, "", INET_TYPE_COUNT, B_TRUE, IVE_UNSET, NULL, B_FALSE},
                                                                    ^~~~

    ilbd_scf.c: In function 'ilbd_get_svr_field':
    ilbd_scf.c:422:41: error: comparison between pointer and integer [-Werror]
      if (inet_pton(ip_ver, ipaddr, addrptr) == NULL) {
                                             ^~

    ilbd_rules.c: In function 'ilbd_ip_to_str':
    ilbd_rules.c:1097:59: error: comparison between pointer and integer [-Werror]
      if (inet_ntop(ipversion, (void *)addrptr, valstr, vallen == NULL))
                                                               ^~
    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 ipseckey.c:34:
    /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)
                  ^
    ipseckey.c:544:35: note: in expansion of macro 'NULL'
      {"outbound",  TOK_FLAG_OUTBOUND, NULL},
                                       ^~~~
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'tokens[69].next')
     #define NULL ((void *)0)
                  ^
    ipseckey.c:544:35: note: in expansion of macro 'NULL'
      {"outbound",  TOK_FLAG_OUTBOUND, NULL},
                                       ^~~~
    /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)
                  ^
    ipseckey.c:545:33: note: in expansion of macro 'NULL'
      {"inbound",  TOK_FLAG_INBOUND, NULL},
                                     ^~~~
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'tokens[70].next')
     #define NULL ((void *)0)
                  ^
    ipseckey.c:545:33: note: in expansion of macro 'NULL'
      {"inbound",  TOK_FLAG_INBOUND, NULL},
                                     ^~~~

    ftp.c: In function 'initconn':
    ftp.c:1527:14: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
        *(c2 - 1) = NULL;
                  ^

    ipsecconf.c: In function 'parse_address':
    ipsecconf.c:3029:10: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       *ptr++ = NULL;
              ^
    ipsecconf.c: In function 'parse_action':
    ipsecconf.c:3743:8: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
        *cp = NULL;
            ^
    ipsecconf.c:3746:15: error: comparison between pointer and integer [-Werror]
       while (*buf != NULL && isspace(*buf))
                   ^~
    ipsecconf.c:3750:12: error: comparison between pointer and integer [-Werror]
       if (*buf == NULL)
                ^~
    ipsecconf.c:3775:15: error: comparison between pointer and integer [-Werror]
       while (*buf != NULL && !isspace(*buf) &&
                   ^~
    ipsecconf.c:3779:12: error: comparison between pointer and integer [-Werror]
       if (*buf != NULL) {
                ^~
    ipsecconf.c:3783:10: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
         *buf = NULL;
              ^
    ipsecconf.c:3794:12: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
         *buf++ = NULL;
                ^
    ipsecconf.c:3807:13: error: comparison between pointer and integer [-Werror]
        if (*buf != NULL) {
                 ^~
    ipsecconf.c: In function 'parse_pattern_or_prop':
    ipsecconf.c:3876:8: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
        *cp = NULL;
            ^
    ipsecconf.c:3879:15: error: comparison between pointer and integer [-Werror]
       while (*buf != NULL && isspace(*buf))
                   ^~
    ipsecconf.c:3883:12: error: comparison between pointer and integer [-Werror]
       if (*buf == NULL)
                ^~
    ipsecconf.c:3923:15: error: comparison between pointer and integer [-Werror]
       while (*buf != NULL) {
                   ^~
    ipsecconf.c:3926:12: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
         *buf++ = NULL;
                ^
    ipsecconf.c:3931:14: error: comparison between pointer and integer [-Werror]
         if (*buf != NULL) {
                  ^~
    ipsecconf.c:3944:16: error: comparison between pointer and integer [-Werror]
        while (*buf != NULL && isspace(*buf))
                    ^~
    ipsecconf.c:3951:13: error: comparison between pointer and integer [-Werror]
        if (*buf == NULL)
                 ^~
    ipsecconf.c:3968:16: error: comparison between pointer and integer [-Werror]
        while (*buf != NULL && !isspace(*buf) &&
                    ^~
    ipsecconf.c:3976:13: error: comparison between pointer and integer [-Werror]
        if (*buf != NULL) {
                 ^~
    ipsecconf.c:3978:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
          *buf++ = NULL;
                 ^
    ipsecconf.c:3996:15: error: comparison between pointer and integer [-Werror]
          if (*buf != NULL) {
                   ^~
    ipsecconf.c:4005:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
          *buf++ = NULL;
                 ^
    ipsecconf.c: In function 'parse_one':
    ipsecconf.c:4154:22: error: comparison between pointer and integer [-Werror]
         while (*leftover != NULL) {
                          ^~
    ipqosconf.c: In function 'printifname':
    ipqosconf.c:3099:7: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       *cp = NULL;
           ^
    ipqosconf.c: In function 'readrange':
    ipqosconf.c:4268:34: error: comparison between pointer and integer [-Werror]
       if ((range_st == end) || (*end != NULL) ||
                                      ^~
    ipqosconf.c:4269:29: error: comparison between pointer and integer [-Werror]
           (cp == end) || (*end2 != NULL)) {
                                 ^~
    ipqosconf.c:4278:34: error: comparison between pointer and integer [-Werror]
       if ((range_st == end) || (*end != NULL)) {
                                      ^~
    ipqosconf.c: In function 'read_int_array':
    ipqosconf.c:4408:33: error: comparison between pointer and integer [-Werror]
        if ((svalue == end) || (*end != NULL)) {
                                     ^~
    ipqosconf.c: In function 'read_enum_nvs':
    ipqosconf.c:4974:13: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       name[len] = NULL;
                 ^
    ipqosconf.c: In function 'read_int_array_info':
    ipqosconf.c:5193:30: error: comparison between pointer and integer [-Werror]
      if ((end == token) || (*end != NULL)) {
                                  ^~
    ipqosconf.c: In function 'writeconf':
    ipqosconf.c:9329:12: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       *pathend = NULL;
                ^

    In file included from /code/illumos-gate/proto/root_i386/usr/include/iso/stdio_iso.h:53:0,
                     from /code/illumos-gate/proto/root_i386/usr/include/stdio.h:82,
                     from ilbadm_subr.c:28:
    /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)
                  ^
    ilbadm_subr.c:57:17: note: in expansion of macro 'NULL'
      {ILBD_BAD_VAL, NULL, NULL}
                     ^~~~
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'algo_types[4].v_name[0]')
     #define NULL ((void *)0)
                  ^
    ilbadm_subr.c:57:17: note: in expansion of macro 'NULL'
      {ILBD_BAD_VAL, NULL, NULL}
                     ^~~~
    /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)
                  ^
    ilbadm_subr.c:57:23: note: in expansion of macro 'NULL'
      {ILBD_BAD_VAL, NULL, NULL}
                           ^~~~
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'algo_types[4].v_name[1]')
     #define NULL ((void *)0)
                  ^
    ilbadm_subr.c:57:23: note: in expansion of macro 'NULL'
      {ILBD_BAD_VAL, NULL, NULL}
                           ^~~~
    /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)
                  ^
    ilbadm_subr.c:64:17: note: in expansion of macro 'NULL'
      {ILBD_BAD_VAL, NULL, NULL}
                     ^~~~
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'topo_types[3].v_name[0]')
     #define NULL ((void *)0)
                  ^
    ilbadm_subr.c:64:17: note: in expansion of macro 'NULL'
      {ILBD_BAD_VAL, NULL, NULL}
                     ^~~~
    /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)
                  ^
    ilbadm_subr.c:64:23: note: in expansion of macro 'NULL'
      {ILBD_BAD_VAL, NULL, NULL}
                           ^~~~
    /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'topo_types[3].v_name[1]')
     #define NULL ((void *)0)
                  ^
    ilbadm_subr.c:64:23: note: in expansion of macro 'NULL'
      {ILBD_BAD_VAL, NULL, NULL}
                           ^~~~
    ilbadm_subr.c: In function 'i_store_val':
    ilbadm_subr.c:919:11: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
        *close = NULL;
               ^

    in.telnetd.c: In function 'auth_is':
    in.telnetd.c:925:24: error: comparison between pointer and integer [-Werror]
      while (aptr->AuthName != NULL &&
                            ^~
    in.telnetd.c: In function 'encrypt_is':
    in.telnetd.c:1120:26: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
       encr_data.decrypt.type = NULL;
                              ^
    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 95c745183e701047fab8e4753d4e8bc1dd1323e7

commit  95c745183e701047fab8e4753d4e8bc1dd1323e7
Author: Toomas Soome <tsoome@me.com>
Date:   2019-07-06T21:04:23.000Z

    11296 cmd-inet: NULL pointer errors
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Reviewed by: Garrett D'Amore <garrett@damore.org>
    Approved by: Garrett D'Amore <garrett@damore.org>

Also available in: Atom PDF