Project

General

Profile

Bug #1754

Bug #1450: Illumos should be buildable with GCC4

scsiclass compatible properties with revision info may be erroneously created

Added by Rich Lowe about 8 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
kernel
Start date:
2011-11-09
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage

Description

scsi_hba.c has a constant condition when creating the 'scsiclass' compatible property such that the value including the 'revision' will also be created (and if the revision isn't really present, it'll just have a trailing 'r').

GCC4 notices the constant condition and complains.

--- a/usr/src/uts/common/io/scsi/impl/scsi_hba.c
+++ b/usr/src/uts/common/io/scsi/impl/scsi_hba.c
@@ -3977,7 +3977,7 @@ scsi_hba_ident_nodename_compatible_get(struct scsi_inquiry *inq,
     }

     /* ( 4) scsiclass,DD.vV.pP.rR */
-    if (*vid && *pid && rev) {
+    if (*vid && *pid && *rev) {
         *csp++ = p;
         (void) snprintf(p, tlen, "scsiclass,%02x.v%s.p%s.r%s",
             dtype_node, vid, pid, rev);

History

#1

Updated by Rich Lowe about 8 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100
  • Difficulty changed from Medium to Bite-size

Resolved in r13519 commit:cbb99929897f

Also available in: Atom PDF