Used UNUSED in a place.
Put r_sanity_check conditional in macro.