Project

General

Profile

Actions

Bug #16536

closed

st: this 'if' clause does not guard...

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

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

100%

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

Description

gcc 13 is complaining:

    ../../common/io/scsi/targets/st.c: In function 'st_probe':
    ../../common/sys/scsi/targets/stdef.h:1461:5: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
     1461 |     if (d == st_lastdev || d == 0) lev = CE_CONT; mutex_exit(&st_debug_mutex);
          |     ^~
    ../../common/sys/scsi/targets/stdef.h:1488:47: note: in expansion of macro 'DEBLOCK'
     1488 | #define ST_ENTR(d, fn) if (st_debug & 0x10) { DEBLOCK(d) \
          |                                               ^~~~~~~
    ../../common/io/scsi/targets/st.c:800:9: note: in expansion of macro 'ST_ENTR'
      800 |         ST_ENTR(devi, st_probe);
          |         ^~~~~~~
    ../../common/sys/scsi/targets/stdef.h:1461:51: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
     1461 |     if (d == st_lastdev || d == 0) lev = CE_CONT; mutex_exit(&st_debug_mutex);
          |                                                   ^~~~~~~~~~
    ../../common/sys/scsi/targets/stdef.h:1488:47: note: in expansion of macro 'DEBLOCK'
     1488 | #define ST_ENTR(d, fn) if (st_debug & 0x10) { DEBLOCK(d) \
          |                                               ^~~~~~~

Apparently the gcc 13 has improved this diagnostic.

Actions #1

Updated by Electric Monk 20 days ago

  • Gerrit CR set to 3464
Actions #2

Updated by Toomas Soome 10 days ago

  • Status changed from In Progress to Pending RTI

Testing done: build, wsdiff is reporting:

tsoome@balrog:/code/16536/usr/src/uts/intel$ grep -B1 NOTE: report.txt 
/code/16536/usr/src/uts/intel/st/.make.state
NOTE: ASCII difference detected.
--
/code/16536/usr/src/uts/intel/st/obj64/st
NOTE: ELF .rela.text difference detected.
--
/code/16536/usr/src/uts/intel/st/obj64/st.o
NOTE: ELF .debug_info difference detected.
tsoome@balrog:/code/16536/usr/src/uts/intel$

Actions #3

Updated by Electric Monk 9 days ago

  • Status changed from Pending RTI to Closed
  • % Done changed from 90 to 100

git commit 8ab441ef78c0aa3a5e87b38d2f5a0b5316b6da11

commit  8ab441ef78c0aa3a5e87b38d2f5a0b5316b6da11
Author: Toomas Soome <tsoome@me.com>
Date:   2024-05-17T04:50:23.000Z

    16536 st: this 'if' clause does not guard...
    Reviewed by: Gordon Ross <Gordon.W.Ross@gmail.com>
    Reviewed by: Bill Sommerfeld <sommerfeld@hamachi.org>
    Reviewed by: Vitaliy Gusev <gusev.vitaliy@gmail.com>
    Reviewed by: Andy Fiddaman <illumos@fiddaman.net>
    Approved by: Dan McDonald <danmcd@mnx.io>

Actions

Also available in: Atom PDF