10799 i86xpv: NULL pointer errors

Review Request #1764 - Created April 14, 2019 and updated

Information
Toomas Soome
illumos-gate
10799
dbaee49...
Reviewers
general
../../common/xen/io/xdb.c: In function 'xdb_get_buf':
../../common/xen/io/xdb.c:375:26: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
     unmapop.dev_bus_addr = NULL;
                          ^
../../common/xen/io/xdb.c: In function 'xdb_biodone':
../../common/xen/io/xdb.c:679:28: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
   unmapops[i].dev_bus_addr = NULL;
                            ^
In file included from ../../common/sys/param.h:48:0,
                 from ../../common/sys/t_lock.h:38,
                 from ../../common/sys/conf.h:37,
                 from ../../common/xen/io/xdb.c:52:
../../common/sys/null.h:32:14: error: passing argument 3 of 'ldi_ioctl' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../../common/xen/io/xdb.c:700:29: note: in expansion of macro 'NULL'
       DKIOCFLUSHWRITECACHE, NULL, FKIOCTL, kcred, NULL);
                             ^~~~
In file included from ../../common/sys/ddi_obsolete.h:18:0,
                 from ../../intel/sys/ddi_isa.h:33,
                 from ../../common/sys/ddi_impldefs.h:46,
                 from ../../common/sys/sunddi.h:43,
                 from ../../common/xen/io/xdb.c:55:
../../common/sys/sunldi.h:109:12: note: expected 'intptr_t {aka long int}' but argument is of type 'void *'
 extern int ldi_ioctl(ldi_handle_t, int, intptr_t, int, cred_t *, int *);
            ^~~~~~~~~
../../common/xen/io/xdb.c: In function 'xdb_attach':
../../common/xen/io/xdb.c:1695:24: error: comparison between pointer and integer [-Werror]
  if ((strcmp(str, "r") == NULL) || (strcmp(str, "ro") == NULL))
                        ^~
../../common/xen/io/xdb.c:1695:55: error: comparison between pointer and integer [-Werror]
  if ((strcmp(str, "r") == NULL) || (strcmp(str, "ro") == NULL))
                                                       ^~

../../common/xen/os/xvdi.c: In function 'xvdi_map_ring':
../../common/xen/os/xvdi.c:592:23: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
  unmapop.dev_bus_addr = NULL;
                       ^
../../common/xen/os/xvdi.c: In function 'xvdi_unmap_ring':
../../common/xen/os/xvdi.c:615:23: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
  unmapop.dev_bus_addr = NULL;
                       ^

../../i86pc/vm/vm_machdep.c: In function 'create_contig_pfnlist':
../../i86pc/vm/vm_machdep.c:2288:26: error: comparison between pointer and integer [-Werror]
        NULL, TQ_NOSLEEP) != NULL)
                          ^~

../../i86pc/os/fakebop.c: In function 'xen_parse_props':
../../i86pc/os/fakebop.c:996:15: error: comparison between pointer and integer [-Werror]
   while ((*cp != NULL) && (*cp != ':'))
               ^~
../../i86pc/os/fakebop.c:1000:8: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
    *cp = NULL;
        ^
cc1: all warnings being treated as errors

  
John Levon
Ship It!
Robert Mustacchi
Ship It!
Loading...