Project

General

Profile

Bug #10638

sd: NULL pointer errors

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

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

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

Build errors with NULL pointer:

    ../../common/io/scsi/targets/sd.c: In function 'sdclose':
    ../../common/io/scsi/targets/sd.c:10572:11: error: comparison between pointer and integer [-Werror]
       if (*cp != NULL) {
               ^~
    ../../common/io/scsi/targets/sd.c: In function 'sdioctl':
    ../../common/io/scsi/targets/sd.c:22969:50: error: comparison between pointer and integer [-Werror]
       if (((err = drv_priv(cred_p)) != EPERM) && arg != NULL) {
                                                      ^~
    ../../common/io/scsi/targets/sd.c:22981:50: error: comparison between pointer and integer [-Werror]
       if (((err = drv_priv(cred_p)) != EPERM) && arg != NULL) {
                                                      ^~
    ../../common/io/scsi/targets/sd.c:22995:19: error: comparison between pointer and integer [-Werror]
        } else if (arg != NULL) {
                       ^~
    ../../common/io/scsi/targets/sd.c:23017:19: error: comparison between pointer and integer [-Werror]
        } else if (arg != NULL) {
                       ^~
    ../../common/io/scsi/targets/sd.c:23039:19: error: comparison between pointer and integer [-Werror]
        } else if (arg != NULL) {
                       ^~
    ../../common/io/scsi/targets/sd.c:23061:19: error: comparison between pointer and integer [-Werror]
        } else if (arg != NULL) {
                       ^~
    ../../common/io/scsi/targets/sd.c:23084:19: error: comparison between pointer and integer [-Werror]
        } else if (arg != NULL) {
                       ^~
    cc1: all warnings being treated as errors

History

#1

Updated by Toomas Soome 8 months ago

  • Status changed from New to In Progress
#2

Updated by Electric Monk 8 months ago

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

git commit 21cce053c53f8dd4d7cf62745effd4c46fbb143c

commit  21cce053c53f8dd4d7cf62745effd4c46fbb143c
Author: Toomas Soome <tsoome@me.com>
Date:   2019-04-10T14:24:59.000Z

    10638 sd: NULL pointer errors
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Reviewed by: Gergő Doma <domag02@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF