added assertion to help suppress clang warnings #757

Merged
merged 3 commits into from Dec 23, 2016

Projects

None yet

3 participants

@patcheng
Contributor

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.

patcheng added some commits Sep 30, 2016
@patcheng patcheng added assertion to help suppress clang warnings
9d8df28
@patcheng patcheng Reserve() is sometimes called when stackTop_ is null. The assert is i…
…nvalid.
91a803d
@coveralls

Coverage Status

Coverage decreased (-0.002%) to 99.935% when pulling 91a803d on patcheng:feature/fix_clang_warning into ffc7942 on miloyip:master.

@patcheng patcheng 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.
95224af
@coveralls
coveralls commented Sep 30, 2016 edited

Coverage Status

Coverage increased (+3.0e-05%) to 99.937% when pulling 95224af on patcheng:feature/fix_clang_warning into ffc7942 on miloyip:master.

@miloyip miloyip merged commit 03a7391 into miloyip:master Dec 23, 2016

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment