fix compile error with clang (referenced undefined variable in assert)