Project

General

Profile

Actions

Bug #10799

closed

i86xpv: NULL pointer errors

Added by Toomas Soome about 4 years ago. Updated about 4 years ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

NULL pointer errors:

    ../../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

Actions #1

Updated by Electric Monk about 4 years ago

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

git commit 2952f70a6a70b04a459a24166d796cdf2f629ed8

commit  2952f70a6a70b04a459a24166d796cdf2f629ed8
Author: Toomas Soome <tsoome@me.com>
Date:   2019-04-22T05:40:26.000Z

    10799 i86xpv: NULL pointer errors
    Reviewed by: John Levon <john.levon@joyent.com>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Richard Lowe <richlowe@richlowe.net>

Actions

Also available in: Atom PDF