Fixed unused variable warning when compiling in Release mode
Added parenthesis suggested by gcc

No difference in behavior, but good for clarity.

warning: suggest parentheses around comparison in operand of ‘^’
[-Wparentheses]