Project

General

Profile

Actions

Bug #10663

closed

stmf_sbd: NULL pointer errors

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

Status:
Closed
Priority:
Normal
Assignee:
Category:
comstar - iSCSI/FC/SAS target
Start date:
2019-04-02
Due date:
% Done:

100%

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

Description

Build errors with NULL pointer:

    In file included from ../../common/vm/seg.h:43:0,
                     from ../../common/vm/as.h:47,
                     from ../../common/sys/devops.h:37,
                     from ../../common/sys/conf.h:57,
                     from ../../common/io/comstar/lu/stmf_sbd/sbd_scsi.c:27:
    ../../common/io/comstar/lu/stmf_sbd/sbd_scsi.c: In function 'sbd_flush_data_cache':
    ../../common/sys/null.h:32:14: error: passing argument 3 of 'fop_ioctl' makes integer from pointer without a cast [-Werror=int-conversion]
     #define NULL ((void *)0)
                  ^
    ../../common/sys/vnode.h:1115:21: note: in definition of macro 'VOP_IOCTL'
      fop_ioctl(vp, cmd, a, f, cr, rvp, ct)
                         ^
    ../../common/io/comstar/lu/stmf_sbd/sbd_scsi.c:3706:57: note: in expansion of macro 'NULL'
       ret = VOP_IOCTL(sl->sl_data_vp, DKIOCFLUSHWRITECACHE, NULL,
                                                             ^~~~
    ../../common/sys/vnode.h:1024:12: note: expected 'intptr_t {aka long int}' but argument is of type 'void *'
     extern int fop_ioctl(vnode_t *, int, intptr_t, int, cred_t *, int *,
                ^~~~~~~~~

    ../../common/io/comstar/lu/stmf_sbd/sbd.c: In function 'sbd_update_zfs_prop':
    ../../common/io/comstar/lu/stmf_sbd/sbd.c:3505:11: error: assignment makes integer from pointer without a cast [-Werror=int-conversion]
      *ah_meta = NULL;
               ^
    cc1: all warnings being treated as errors

Actions #1

Updated by Electric Monk over 4 years ago

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

git commit e59325b74ca0760391c4b4d3acd8d3294ffc521a

commit  e59325b74ca0760391c4b4d3acd8d3294ffc521a
Author: Toomas Soome <tsoome@me.com>
Date:   2019-04-10T06:20:41.000Z

    10663 stmf_sbd: NULL pointer errors
    Reviewed by: Andy Stormont <astormont@racktopsystems.com>
    Reviewed by: Gergő Doma <domag02@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF