10726 elfexec: NULL pointer errors

Review Request #1692 — Created April 10, 2019 and submitted

tsoome
illumos-gate
10726
11ea704...
general
../../common/exec/elf/elf.c: In function 'mapexec_brand':
../../common/exec/elf/elf.c:232:12: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
   *lddatap = NULL;
            ^
../../common/exec/elf/elf.c: In function 'elfexec':
../../common/exec/elf/elf.c:923:22: error: comparison between pointer and integer [-Werror]
   if (args->commpage != NULL ||
                      ^~
../../common/exec/elf/elf.c:924:55: error: comparison between pointer and integer [-Werror]
       (args->commpage = (uintptr_t)comm_page_mapin()) != NULL) {
                                                       ^~
In file included from ../../common/sys/param.h:48:0,
                 from ../../common/exec/elf/elf.c:33:
../../common/exec/elf/elf.c: In function 'elfcore':
../../common/sys/null.h:32:14: error: passing argument 6 of 'process_scns' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../../common/exec/elf/elf.c:1951:54: note: in expansion of macro 'NULL'
   (void) process_scns(content, p, credp, NULL, NULL, NULL, 0,
                                                      ^~~~
../../common/exec/elf/elf.c:1626:1: note: expected 'int' but argument is of type 'void *'
 process_scns(core_content_t content, proc_t *p, cred_t *credp, vnode_t *vp,
 ^~~~~~~~~~~~
cc1: all warnings being treated as errors


  • 0
  • 0
  • 2
  • 0
  • 2
Description From Last Updated
jlevon
  1. 
      
  2. usr/src/uts/common/exec/elf/elf.c (Diff revision 1)
     
     

    this should be (uintptr_t)NULL

  3. usr/src/uts/common/exec/elf/elf.c (Diff revision 1)
     
     
  4. 
      
tsoome
jlevon
  1. Ship It!
  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...