silence -Wswitch and -Wparenthesis warnings