ALL,
long long unsigned int bigvalue;
bigvalue = (codeword[0] & 0XFFFC) >> 2;
bigvalue |= (codeword[1] & 0XFFFF) << 14;
bigvalue |= (codeword[2] & 0XFFFF) << 30;
bigvalue |= (codeword[3] & 0XFFFF) << 46;
codeword
is of type guint16.
I am getting an error on the last line: left shift count >= width of type
.
What would be the way to mitigate?
TIA!!
EDIT:
There was a suggested answer. However the question is completely different. I'm asking about compiler error amd the referenced question is about the wrong result.
EDIT2:
To give a little more context - that piece of code is suppose to parse the WS stream (it is inside the dissector). The code is auto-generated by the Perl script from the set of rules. I'm trying to fix an issue where the code is crashing because the last line is not there.
The field that should be parsed is 68 bits long and it is read into 5 elements - codeword[i]. In front of it is 2 bits indicator, hence 0xfffc in the second line.
I will try casting and report back tomorrow.
Thank you.
EDIT3:
Please, please, please stop suggesting completely unrelated to this one questions as solutions! They don't have anything in common!!
Thank you.