Project

General

Profile

Bug #11390

Updated by Toomas Soome about 3 years ago

Build errors with NULL pointer: 
 <pre> 
     kconf.c: In function 'main': 
     kconf.c:213:43: error: comparison between pointer and integer [-Werror] 
       if ((code =    __profile_release(profile)) != NULL) 
                                                ^~ 
    
     kadm5_create.c: In function 'add_admin_princ': 
     kadm5_create.c:309:24: error: comparison between pointer and integer [-Werror] 
         if (ret || *enctype == 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 kdb5_create.c:60: 
     kdb5_create.c: In function 'kdb5_create': 
     /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) 
                   ^ 
     kdb5_create.c:171:34: note: in expansion of macro 'NULL' 
          krb5_data master_salt = { 0, NULL }; 
                                       ^~~~ 
     /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: note: (near initialization for 'master_salt.length') 
      #define NULL ((void *)0) 
                   ^ 
     kdb5_create.c:171:34: note: in expansion of macro 'NULL' 
          krb5_data master_salt = { 0, 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 kwarnd_proc.c:32: 
     kwarnd_proc.c: In function 'kwarnd_check_warning_list': 
     /code/illumos-gate/proto/root_i386/usr/include/sys/null.h:28:14: error: passing argument 2 of 'poll' makes integer from pointer without a cast [-Werror=int-conversion] 
      #define NULL ((void *)0) 
                   ^ 
     kwarnd_proc.c:886:21: note: in expansion of macro 'NULL' 
        (void) poll(NULL, NULL, 60000); 
                          ^~~~ 
     In file included from /code/illumos-gate/proto/root_i386/usr/include/sys/socket.h:62:0, 
                      from /code/illumos-gate/proto/root_i386/usr/include/rpc/rpc.h:65, 
                      from kwarnd.h:9, 
                      from kwarnd_proc.c:40: 
     /code/illumos-gate/proto/root_i386/usr/include/sys/poll.h:152:5: note: expected 'nfds_t {aka long unsigned int}' but argument is of type 'void *' 
      int poll(struct pollfd *, nfds_t, int); 
          ^~~~ 
     cc1: all warnings being treated as errors 
 </pre>

Back