Project

General

Profile

Bug #10872

sd: NULL pointer errors

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

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

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

Debug build errors with NULL pointer:

    ../../common/io/scsi/targets/sd.c: In function 'sd_faultinjection_ioctl':
    ../../common/io/scsi/targets/sd.c:30552:11: error: comparison between pointer an
    d integer [-Werror]
       if (arg != NULL) {
               ^~
    ../../common/io/scsi/targets/sd.c:30586:11: error: comparison between pointer an
    d integer [-Werror]
       if (arg != NULL) {
               ^~
    ../../common/io/scsi/targets/sd.c:30621:11: error: comparison between pointer an
    d integer [-Werror]
       if (arg != NULL) {
               ^~
    ../../common/io/scsi/targets/sd.c:30656:11: error: comparison between pointer an
    d integer [-Werror]
       if (arg != NULL) {
               ^~
    ../../common/io/scsi/targets/sd.c:30682:11: error: comparison between pointer an
    d integer [-Werror]
       if (arg != NULL) {
               ^~
    ../../common/io/scsi/targets/sd.c:30717:8: error: assignment makes integer from
    pointer without a cast [-Werror=int-conversion]
        arg = NULL;
            ^
    cc1: all warnings being treated as errors

History

#1

Updated by Electric Monk 7 months ago

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

git commit ec94a9ff4ab0283a0221a1c4e0257d20427d5960

commit  ec94a9ff4ab0283a0221a1c4e0257d20427d5960
Author: Toomas Soome <tsoome@me.com>
Date:   2019-05-06T15:53:18.000Z

    10872 sd: NULL pointer errors
    Reviewed by: John Levon <john.levon@joyent.com>
    Reviewed by: Gergő Doma <domag02@gmail.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF