Closed betsch85 closed 21 hours ago
In the following lines, MSVC warns that & might rather be && and *(postPaddedBuffer++) |= 32 has "possible incorrect order of operations" (C6269)
&
&&
*(postPaddedBuffer++) |= 32
"possible incorrect order of operations"
https://github.com/uNetworking/uWebSockets/blob/85b1bda3ef601392ba5e91e0e3803f5e197e9399/src/MessageParser.h#L37-L39
About the first warning, MSVC is probably correct, about the second one, to be honest, I have no idea what the purpose of that expression is
edit: I now understand what |= 32 is for
|= 32
edit2: nevermind, bitwise and on boolean results is fine, despite the warning
You fix it by putting parenthesis around intended behaviour
In the following lines, MSVC warns that
&
might rather be&&
and*(postPaddedBuffer++) |= 32
has"possible incorrect order of operations"
(C6269)https://github.com/uNetworking/uWebSockets/blob/85b1bda3ef601392ba5e91e0e3803f5e197e9399/src/MessageParser.h#L37-L39
About the first warning, MSVC is probably correct, about the second one, to be honest, I have no idea what the purpose of that expression is
edit: I now understand what
|= 32
is foredit2: nevermind, bitwise and on boolean results is fine, despite the warning