10798 xpv: NULL pointer errors

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

Information
Toomas Soome
illumos-gate
10798
93bd538...
Reviewers
general
In file included from ../../../common/sys/param.h:48:0,
                 from ../../../common/sys/t_lock.h:38,
                 from ../../../common/sys/signal.h:249,
                 from ../../../common/sys/procset.h:40,
                 from ../../../common/sys/processor.h:38,
                 from ../../../intel/sys/hypervisor.h:71,
                 from ../../../common/xen/io/xenbus_client.c:60:
../../../common/xen/io/xenbus_client.c: In function 'common_dev_error':
../../../common/sys/null.h:32:14: error: passing argument 1 of 'xenbus_write' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../../../common/xen/io/xenbus_client.c:196:19: note: in expansion of macro 'NULL'
  if (xenbus_write(NULL, path_buffer, "error", printf_buffer) != 0) {
                   ^~~~
In file included from ../../../common/xen/io/xenbus_client.c:67:0:
../../../common/xen/sys/xenbus_impl.h:122:12: note: expected 'xenbus_transaction_t {aka unsigned int}' but argument is of type 'void *'
 extern int xenbus_write(xenbus_transaction_t t, const char *dir,
            ^~~~~~~~~~~~
In file included from ../../../common/sys/param.h:48:0,
                 from ../../../common/sys/t_lock.h:38,
                 from ../../../common/sys/signal.h:249,
                 from ../../../common/sys/procset.h:40,
                 from ../../../common/sys/processor.h:38,
                 from ../../../intel/sys/hypervisor.h:71,
                 from ../../../common/xen/io/xenbus_client.c:60:
../../../common/xen/io/xenbus_client.c: In function 'xenbus_dev_ok':
../../../common/sys/null.h:32:14: error: passing argument 1 of 'xenbus_rm' makes integer from pointer without a cast [-Werror=int-conversion]
 #define NULL ((void *)0)
              ^
../../../common/xen/io/xenbus_client.c:238:17: note: in expansion of macro 'NULL'
   if (xenbus_rm(NULL, dev->nodename, "error") != 0)
                 ^~~~
In file included from ../../../common/xen/io/xenbus_client.c:67:0:
../../../common/xen/sys/xenbus_impl.h:128:12: note: expected 'xenbus_transaction_t {aka unsigned int}' but argument is of type 'void *'
 extern int xenbus_rm(xenbus_transaction_t t, const char *dir,
            ^~~~~~~~~
cc1: all warnings being treated as errors

  
Andrew Stormont
Ship It!
Robert Mustacchi
Ship It!
Loading...