Project

General

Profile

Bug #10798

xpv: NULL pointer errors

Added by Toomas Soome 4 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
driver - device drivers
Start date:
2019-04-14
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

NULL pointer errors:

    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

History

#1

Updated by Electric Monk 4 months ago

  • % Done changed from 90 to 100
  • Status changed from In Progress to Closed

git commit a2d4e26a43f10718fe33e47fa968a3fdf901e156

commit  a2d4e26a43f10718fe33e47fa968a3fdf901e156
Author: Toomas Soome <tsoome@me.com>
Date:   2019-04-22T05:29:23.000Z

    10798 xpv: NULL pointer errors
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Also available in: Atom PDF