Project

General

Profile

Actions

Bug #10650

closed

timerfd: NULL pointer errors

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

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Build errors with NULL pointer:

    ../../common/io/timerfd.c: In function 'timerfd_open':
    ../../common/io/timerfd.c:125:10: error: return makes integer from pointer without a cast [-Werror=int-conversion]
       return (NULL);
              ^
    ../../common/io/timerfd.c: In function 'timerfd_ioctl':
    ../../common/io/timerfd.c:334:29: error: comparison between pointer and integer [-Werror]
       if (st.tfd_settime_ovalue != NULL) {
                                 ^~
    ../../common/io/timerfd.c:376:41: error: comparison between pointer and integer [-Werror]
       if (err != 0 || st.tfd_settime_ovalue == NULL)
                                             ^~
    In file included from ../../common/sys/param.h:48:0,
                     from ../../common/sys/t_lock.h:38,
                     from ../../common/sys/map.h:35,
                     from ../../common/sys/ddi.h:37,
                     from ../../common/io/timerfd.c:22:
    ../../common/io/timerfd.c: In function 'timerfd_attach':
    ../../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/timerfd.c:458:39: note: in expansion of macro 'NULL'
          TIMERFDMNRN_TIMERFD, DDI_PSEUDO, NULL) == DDI_FAILURE) {
                                           ^~~~
    In file included from ../../common/io/timerfd.c:23: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

Actions #1

Updated by Electric Monk about 3 years ago

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

git commit 986667e8344d0f6a3e45df8c7ddcc62f747e3793

commit  986667e8344d0f6a3e45df8c7ddcc62f747e3793
Author: Toomas Soome <tsoome@me.com>
Date:   2019-04-10T06:03:21.000Z

    10650 timerfd: NULL pointer errors
    Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
    Reviewed by: Gergő Doma <domag02@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF