summaryrefslogtreecommitdiff
path: root/upbc
diff options
context:
space:
mode:
authorVishal Powar <vishalpowar@google.com>2018-11-20 11:36:38 -0800
committerVishal Powar <vishalpowar@google.com>2018-11-20 11:36:38 -0800
commit0811b6fead2e2f728608a00bed714e7d4fbb5e47 (patch)
tree80036ad45a6a1c8ec677b37adf18c2419efbe094 /upbc
parentcb113bc8ccbf4357d4a3a43c8d1592d9f40bd70d (diff)
Explicit cast when creating a new struct
Diffstat (limited to 'upbc')
-rw-r--r--upbc/generator.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/upbc/generator.cc b/upbc/generator.cc
index 56e6276..0f7d14d 100644
--- a/upbc/generator.cc
+++ b/upbc/generator.cc
@@ -292,7 +292,7 @@ void GenerateMessageInHeader(const protobuf::Descriptor* message, Output& output
output(
"extern const upb_msglayout $0_msginit;\n"
"UPB_INLINE $0 *$0_new(upb_arena *arena) {\n"
- " return upb_msg_new(&$0_msginit, arena);\n"
+ " return ($0 *)upb_msg_new(&$0_msginit, arena);\n"
"}\n"
"UPB_INLINE $0 *$0_parsenew(upb_stringview buf, upb_arena *arena) {\n"
" $0 *ret = $0_new(arena);\n"
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback