Fix unused variable warning if assertions are disabled

as we're using -Werror, this actually breaks the build