fix compiler warnings

fix compiler warnings: "suggest parentheses around arithmetic in operand of '|' [-Wparentheses]"