Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
message.c: Cast uintptr_t types to upb_MessageDef (#1492)
This fixes build with clang python/message.c:1238:49: error: incompatible integer to pointer conversion passing 'uintptr_t' (aka 'unsigned long') to parameter of type 'const upb_MessageDef *' (aka 'const struct upb_MessageDef *') [-Wint-conversion] 1238 | upb_MessageDef_MiniTable(other->def), | ^~~~~~~~~~ /mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/python3-protobuf/4.24.0/protobuf-4.24.0/upb/reflection/message_def.h:138:69: note: passing argument to parameter 'm' here 138 | const upb_MiniTable* upb_MessageDef_MiniTable(const upb_MessageDef* m); | ^ python/message.c:1609:69: error: incompatible integer to pointer conversion passing 'uintptr_t' (aka 'unsigned long') to parameter of type 'const upb_MessageDef *' (aka 'const struct upb_MessageDef *') [-Wint-conversion] 1609 | upb_Message_DeepClone(self->ptr.msg, upb_MessageDef_MiniTable(self->def), | ^~~~~~~~~ /mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/python3-protobuf/4.24.0/protobuf-4.24.0/upb/reflection/message_def.h:138:69: note: passing argument to parameter 'm' here 138 | const upb_MiniTable* upb_MessageDef_MiniTable(const upb_MessageDef* m); | ^ python/message.c:1611:44: error: incompatible integer to pointer conversion passing 'uintptr_t' (aka 'unsigned long') to parameter of type 'const upb_MessageDef *' (aka 'const struct upb_MessageDef *') [-Wint-conversion] 1611 | PyObject* ret = PyUpb_Message_Get(clone, self->def, arena); | ^~~~~~~~~ Co-authored-by: Adam Cozzette <acozzette@google.com>
- Loading branch information