summaryrefslogtreecommitdiff
path: root/upb/generated_util.h
diff options
context:
space:
mode:
authorNicolas Noble <nicolasnoble@users.noreply.github.com>2019-07-26 15:21:03 -0700
committerGitHub <noreply@github.com>2019-07-26 15:21:03 -0700
commit423ea5ca9ce8da69611e6e95559efcb3a1ba8ad8 (patch)
treef2b8917eb9204d3c935287bfdb09f7a5da6aae89 /upb/generated_util.h
parent1ee1e362565f681fdd46f16bf9f70f51c905ddd4 (diff)
parent2825f867bb38a6523f4d41920cc492c7f529c070 (diff)
Merge pull request #194 from veblush/conversion-warning
Added explicit type casting to char
Diffstat (limited to 'upb/generated_util.h')
-rw-r--r--upb/generated_util.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/upb/generated_util.h b/upb/generated_util.h
index a0b3e8d..234bcda 100644
--- a/upb/generated_util.h
+++ b/upb/generated_util.h
@@ -87,11 +87,11 @@ UPB_INLINE bool _upb_has_field(const void *msg, size_t idx) {
}
UPB_INLINE bool _upb_sethas(const void *msg, size_t idx) {
- return (*PTR_AT(msg, idx / 8, char)) |= (1 << (idx % 8));
+ return (*PTR_AT(msg, idx / 8, char)) |= (char)(1 << (idx % 8));
}
UPB_INLINE bool _upb_clearhas(const void *msg, size_t idx) {
- return (*PTR_AT(msg, idx / 8, char)) &= ~(1 << (idx % 8));
+ return (*PTR_AT(msg, idx / 8, char)) &= (char)(~(1 << (idx % 8)));
}
UPB_INLINE bool _upb_has_oneof_field(const void *msg, size_t case_ofs, int32_t num) {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback