Similar to #727
But the clang warning I got traced back to the pointer returned by PushUnsafe.
I assume this case never happens, so an assert should be sufficient. At least clang is happy with an assertion.
added assertion to help suppress clang warnings
Reserve() is sometimes called when stackTop_ is null. The assert is i…
Coverage decreased (-0.002%) to 99.935% when pulling 91a803d on patcheng:feature/fix_clang_warning into ffc7942 on miloyip:master.
When length is 0, the code does nothing, so skip it completely.
Previously, os.Push(0) would do nothing as well. But with the newly added assertion, is the stack is empty, it will fail the assertion.
Coverage increased (+3.0e-05%) to 99.937% when pulling 95224af on patcheng:feature/fix_clang_warning into ffc7942 on miloyip:master.