diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2016-05-12 11:54:34 -0700 |
---|---|---|
committer | Joshua Haberman <jhaberman@gmail.com> | 2016-05-12 11:54:34 -0700 |
commit | fa338b70a602d9f5657528d0322535959a92d4b0 (patch) | |
tree | a7ec8b8d61a1ff3657aff99316ec51a8b81726ad /upb/bindings/stdc | |
parent | e16ed470be7d0d459e85e1d7b43893358a625d34 (diff) |
Added UPB_ASSERT() that helps avoid unused var warnings.
* Added UPB_ASSERT() that helps avoid unused var warnings.
* Addressed PR comments.
* Fixed assert in the JIT.
Diffstat (limited to 'upb/bindings/stdc')
-rw-r--r-- | upb/bindings/stdc/io.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/upb/bindings/stdc/io.c b/upb/bindings/stdc/io.c index a95eb48..fe82014 100644 --- a/upb/bindings/stdc/io.c +++ b/upb/bindings/stdc/io.c @@ -36,7 +36,7 @@ static upb_stdio_buf *upb_stdio_rotatebufs(upb_stdio *s) { reuse[num_reused++] = buf; } } - assert(num_reused + num_inuse == s->nbuf); + UPB_ASSERT(num_reused + num_inuse == s->nbuf); memcpy(s->bufs + num_inuse, reuse, num_reused * sizeof(upb_stdio_buf*)); if (num_reused == 0) { ++s->nbuf; @@ -78,7 +78,7 @@ retry: return upb_errno_is_wouldblock(errno) ? UPB_BYTE_WOULDBLOCK : UPB_BYTE_ERROR; } - assert(false); + UPB_ASSERT(false); } return UPB_BYTE_OK; } |