SHRI
SHRI

Reputation: 2466

unisigned char right shift to 8 bits getting warning

psApdu->ble>>8

when i compile this statement in visual studio,

errorC220: warning treated as error - no 'object' file generated.

warning C4333: '>>' right shift by too large amount, data loss

Why this warning?

info: ble is an unsigned char field of structure psApdu

Upvotes: 0

Views: 555

Answers (1)

Jerry Coffin
Jerry Coffin

Reputation: 490218

It's oh-so-subtly trying to point out that taking an 8-bit quantity and right-shifting it 8 bits leaves nothing of the input, so the result isn't likely to be of a lot of use as a rule.

Upvotes: 2

Related Questions