Closed ainsleyclark closed 2 years ago
Hello @ainsleyclark this is not an error. This is just a warning hint from compiler for make the code a little bit faster. If you take a look at this file, the code tries to calculate 2 to the power of ALPHA_OFFSET. There is a better and faster way of doing this by using bitwise operator, like shift. Both 2 ^ ALPHA_OFFSET
and 1 << ALPHA_OFFSET
has the same output but the second option is faster.
I think, for readability, 2 ^ ALPHA_OFFSET
is much more understandable than 1 << ALPHA_OFFSET
So the bottom line is, you can safely ignore this warning.
"Both 2 ^ ALPHA_OFFSET and 1 << ALPHA_OFFSET has the same output but the second option is faster." -> As the compiler warning tells, they are not the same at all, 2 ^ ALPHA_OFFSET is a XOR operator in c, it does not mean 2 to the power of ALPHA_OFFSET
大佬修一下吧
can you fix it
Is there a way to silence this warning?
There is a hint in the console:
picture_csp_enc.c:1002:40: note: replace expression with '0x2 ^ ALPHA_OFFSET' to silence this warning
Hi there,
Thanks for the great package. When installing/building I am receiving an error:
Not sure how to go about this?
Many thanks.