Project

General

Profile

Bug #8394

fcoet: array subscript is above array bounds

Added by Toomas Soome over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
comstar - iSCSI/FC/SAS target
Start date:
2017-06-15
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

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

Also available in: Atom PDF