Project

General

Profile

Actions

Bug #14391

open

pmcs: build errors with gcc 11

Added by Toomas Soome 9 days ago. Updated 9 days ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
driver - device drivers
Start date:
Due date:
% Done:

90%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

Build errors:

    ../../../../src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c: In function 'pmcs_sata_special_work':
    ../../../../src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c:281:29: error: array subscript 'struct scsi_inquiry[0]' is partly outside array bounds of 'uint8_t[128]' {aka 'unsigned char[128]'} [-Werror=array-bounds]
      281 |                         inqp->inq_qual = 0;
          |                             ^~
    ../../../../src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c:65:17: note: while referencing 'rp'
       65 |         uint8_t rp[SRESPSZ];
          |                 ^~
    ../../../../src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c:282:29: error: array subscript 'struct scsi_inquiry[0]' is partly outside array bounds of 'uint8_t[128]' {aka 'unsigned char[128]'} [-Werror=array-bounds]
      282 |                         inqp->inq_ansi = 5;     /* spc3 */
          |                             ^~
    ../../../../src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c:65:17: note: while referencing 'rp'
       65 |         uint8_t rp[SRESPSZ];
          |                 ^~
    ../../../../src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c:283:29: error: array subscript 'struct scsi_inquiry[0]' is partly outside array bounds of 'uint8_t[128]' {aka 'unsigned char[128]'} [-Werror=array-bounds]
      283 |                         inqp->inq_rdf = 2;      /* response format 2 */
          |                             ^~
    ../../../../src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c:65:17: note: while referencing 'rp'
       65 |         uint8_t rp[SRESPSZ];
          |                 ^~
    ../../../../src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c:284:29: error: array subscript 'struct scsi_inquiry[0]' is partly outside array bounds of 'uint8_t[128]' {aka 'unsigned char[128]'} [-Werror=array-bounds]
      284 |                         inqp->inq_len = 32;
          |                             ^~
    ../../../../src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c:65:17: note: while referencing 'rp'
       65 |         uint8_t rp[SRESPSZ];
          |                 ^~
    ../../../../src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c:287:37: error: array subscript 'struct scsi_inquiry[0]' is partly outside array bounds of 'uint8_t[128]' {aka 'unsigned char[128]'} [-Werror=array-bounds]
      287 |                                 inqp->inq_cmdque = 1;
          |                                     ^~
    ../../../../src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c:65:17: note: while referencing 'rp'
       65 |         uint8_t rp[SRESPSZ];
          |                 ^~
    ../../../../src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c:301:37: error: array subscript 'struct scsi_inquiry[0]' is partly outside array bounds of 'uint8_t[128]' {aka 'unsigned char[128]'} [-Werror=array-bounds]
      301 |                                 inqp->inq_revision[0] =
          |                                     ^~
    ../../../../src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c:65:17: note: while referencing 'rp'
       65 |         uint8_t rp[SRESPSZ];
          |                 ^~
    ../../../../src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c:303:37: error: array subscript 'struct scsi_inquiry[0]' is partly outside array bounds of 'uint8_t[128]' {aka 'unsigned char[128]'} [-Werror=array-bounds]
      303 |                                 inqp->inq_revision[1] =
          |                                     ^~
    ../../../../src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c:65:17: note: while referencing 'rp'
       65 |         uint8_t rp[SRESPSZ];
          |                 ^~
    ../../../../src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c:305:37: error: array subscript 'struct scsi_inquiry[0]' is partly outside array bounds of 'uint8_t[128]' {aka 'unsigned char[128]'} [-Werror=array-bounds]
      305 |                                 inqp->inq_revision[2] =
          |                                     ^~
    ../../../../src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c:65:17: note: while referencing 'rp'
       65 |         uint8_t rp[SRESPSZ];
          |                 ^~
    ../../../../src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c:307:37: error: array subscript 'struct scsi_inquiry[0]' is partly outside array bounds of 'uint8_t[128]' {aka 'unsigned char[128]'} [-Werror=array-bounds]
      307 |                                 inqp->inq_revision[3] =
          |                                     ^~
    ../../../../src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c:65:17: note: while referencing 'rp'
       65 |         uint8_t rp[SRESPSZ];
          |                 ^~
    ../../../../src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c:310:37: error: array subscript 'struct scsi_inquiry[0]' is partly outside array bounds of 'uint8_t[128]' {aka 'unsigned char[128]'} [-Werror=array-bounds]
      310 |                                 inqp->inq_revision[0] =
          |                                     ^~
    ../../../../src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c:65:17: note: while referencing 'rp'
       65 |         uint8_t rp[SRESPSZ];
          |                 ^~
    ../../../../src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c:312:37: error: array subscript 'struct scsi_inquiry[0]' is partly outside array bounds of 'uint8_t[128]' {aka 'unsigned char[128]'} [-Werror=array-bounds]
      312 |                                 inqp->inq_revision[1] =
          |                                     ^~
    ../../../../src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c:65:17: note: while referencing 'rp'
       65 |         uint8_t rp[SRESPSZ];
          |                 ^~
    ../../../../src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c:314:37: error: array subscript 'struct scsi_inquiry[0]' is partly outside array bounds of 'uint8_t[128]' {aka 'unsigned char[128]'} [-Werror=array-bounds]
      314 |                                 inqp->inq_revision[2] =
          |                                     ^~
    ../../../../src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c:65:17: note: while referencing 'rp'
       65 |         uint8_t rp[SRESPSZ];
          |                 ^~
    ../../../../src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c:316:37: error: array subscript 'struct scsi_inquiry[0]' is partly outside array bounds of 'uint8_t[128]' {aka 'unsigned char[128]'} [-Werror=array-bounds]
      316 |                                 inqp->inq_revision[3] =
          |                                     ^~
    ../../../../src/uts/common/io/scsi/adapters/pmcs/pmcs_sata.c:65:17: note: while referencing 'rp'
       65 |         uint8_t rp[SRESPSZ];
          |                 ^~
    cc1: all warnings being treated as errors

When I did count the bytes, I got more than 128.

Actions #1

Updated by Electric Monk 9 days ago

  • Gerrit CR set to 1939
Actions

Also available in: Atom PDF