Bug #8394

fcoet: array subscript is above array bounds

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

Status:ClosedStart date:2017-06-15
Priority:NormalDue date:
Assignee:Toomas Soome% Done:

100%

Category:comstar - iSCSI/FC/SAS target
Target version:-
Difficulty:Medium Tags:

Description

Build error from gcc 6:

../../common/io/comstar/port/fcoet/fcoet_fc.c: In function 'fcoet_send_status':
../../common/sys/fcoe/fcoe_common.h:214:21: error: array subscript is above array bounds [-Werror=array-bounds]
   ((uint8_t *)(x_b))[3] = 0xFF & (x_v);  \
   ~~~~~~~~~~~~~~~~~~^~~
../../common/io/comstar/port/fcoet/fcoet_fc.c:788:2: note: in expansion of macro 'FCOE_V2B_4'
  FCOE_V2B_4(0, ffr->ffr_retry_delay_timer);
  ^~~~~~~~~~
../../common/sys/fcoe/fcoe_common.h:215:21: error: array subscript is above array bounds [-Werror=array-bounds]
   ((uint8_t *)(x_b))[2] = 0xFF & ((x_v) >> 8); \
   ~~~~~~~~~~~~~~~~~~^~~
../../common/io/comstar/port/fcoet/fcoet_fc.c:788:2: note: in expansion of macro 'FCOE_V2B_4'
  FCOE_V2B_4(0, ffr->ffr_retry_delay_timer);
  ^~~~~~~~~~
cc1: all warnings being treated as errors

History

#1 Updated by Electric Monk 2 months ago

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

git commit 00bdf9afcd6a60aceb896a5b75ac0a061981ee94

commit  00bdf9afcd6a60aceb896a5b75ac0a061981ee94
Author: Toomas Soome <tsoome@me.com>
Date:   2017-06-19T14:38:18.000Z

    8394 fcoet: array subscript is above array bounds
    Reviewed by: Marcel Telka <marcel@telka.sk>
    Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom