Fix warnings about an variable only used in asserts.