Project

General

Profile

Bug #10379

asy: NULL pointer errors

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

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

100%

Estimated time:
Difficulty:
Bite-size
Tags:

Description

Build errors with NULL pointer:

    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/io/asy.c:37:
    ../../common/io/asy.c: In function 'asyattach':
    ../../common/sys/null.h:32:14: error: passing argument 6 of 'ddi_create_minor_node' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/asy.c:1080:65: note: in expansion of macro 'NULL'
          asy->asy_com_port != 0 ? DDI_NT_SERIAL_MB : DDI_NT_SERIAL, NULL);
                                                                     ^~~~
    In file included from ../../common/io/asy.c:62:0:
    ../../common/sys/sunddi.h:1564:1: note: expected 'int' but argument is of type 'void *'
     ddi_create_minor_node(dev_info_t *dip, char *name, int spec_type,
     ^~~~~~~~~~~~~~~~~~~~~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/io/asy.c:37:
    ../../common/sys/null.h:32:14: error: passing argument 6 of 'ddi_create_minor_node' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/io/asy.c:1086:25: note: in expansion of macro 'NULL'
           DDI_NT_SERIAL_DO, NULL);
                             ^~~~
    In file included from ../../common/io/asy.c:62:0:
    ../../common/sys/sunddi.h:1564:1: note: expected 'int' but argument is of type 'void *'
     ddi_create_minor_node(dev_info_t *dip, char *name, int spec_type,
     ^~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk 10 months ago

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

git commit 9b4d666e10e702eac94d0d0f1ca8abec9d851dc1

commit  9b4d666e10e702eac94d0d0f1ca8abec9d851dc1
Author: Toomas Soome <tsoome@me.com>
Date:   2019-02-16T07:41:54.000Z

    10379 asy: NULL pointer errors
    Reviewed by: John Levon <john.levon@joyent.com>
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Approved by: Robert Mustacchi <rm@joyent.com>

Also available in: Atom PDF