Actions
Bug #2562
closedBug #1450: Illumos should be buildable with GCC4
FCoE iniator mistreats its ints
Start date:
2012-03-29
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:
Description
The FCoE initiator sets specific bits by multiplication with the appropriate constant, rather than shifts (as everyone else would). This has the interesting side effect that bits on integer size boundaries are actually negative 0 (that is, 0x8000 is not unsigned). GCC notices this and quite fairly mentions that it's suspicious. We should set bits with shifts, like normal.
Further in fcoei_fill_els_fpkt_resp (what a name...) we do:
prli_acc->image_pair_established = (FCOE_B2V_2(src + offset) & BIT_13) ? 1 : 0; prli_acc->accept_response_code = FCOE_B2V_2(src + offset) & 0x0F00; /*
response_code is 4 bits, and the RHS needs to be shifted 8 bits such that it fits.
Updated by Rich Lowe over 11 years ago
- Status changed from In Progress to Resolved
- % Done changed from 60 to 100
Resolved in r13716 commit:3db0c1979163
Actions