1. 05 4月, 2017 1 次提交
    • A
      scsi: advansys: fix uninitialized data access · 44a5b977
      Arnd Bergmann 提交于
      gcc-7.0.1 now warns about a previously unnoticed access of uninitialized
      struct members:
      
      drivers/scsi/advansys.c: In function 'AscMsgOutSDTR':
      drivers/scsi/advansys.c:3860:26: error: '*((void *)&sdtr_buf+5)' may be used uninitialized in this function [-Werror=maybe-uninitialized]
               ((ushort)s_buffer[i + 1] << 8) | s_buffer[i]);
                                ^
      drivers/scsi/advansys.c:3860:26: error: '*((void *)&sdtr_buf+7)' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      drivers/scsi/advansys.c:3860:26: error: '*((void *)&sdtr_buf+5)' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      drivers/scsi/advansys.c:3860:26: error: '*((void *)&sdtr_buf+7)' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      The code has existed in this exact form at least since v2.6.12, and the
      warning seems correct. This uses named initializers to ensure we
      initialize all members of the structure.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      44a5b977
  2. 30 3月, 2017 12 次提交
  3. 28 3月, 2017 13 次提交
  4. 24 3月, 2017 6 次提交
  5. 23 3月, 2017 8 次提交