From c3cfd09b0184bcbdade71a3d788df02c83e897f2 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Tue, 10 May 2022 08:52:45 -0700 Subject: [PATCH] Fix compiler warnings. PiperOrigin-RevId: 447744251 --- python/message.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/message.c b/python/message.c index b4d2602235..5b6bddd84d 100644 --- a/python/message.c +++ b/python/message.c @@ -428,8 +428,8 @@ static bool PyUpb_CMessage_InitRepeatedAttribute(PyObject* _self, } bool ok = false; PyObject* repeated = PyUpb_CMessage_GetFieldValue(_self, field); - if (!repeated) goto err; PyObject* tmp = NULL; + if (!repeated) goto err; if (upb_FieldDef_IsSubMessage(field)) { if (!PyUpb_CMessage_InitRepeatedMessageAttribute(_self, repeated, value, field)) { @@ -1239,6 +1239,7 @@ static PyObject* PyUpb_CMessage_Clear(PyUpb_CMessage* self, PyObject* args) { if (subobj_map) { upb_Message* msg = PyUpb_CMessage_GetMsg(self); + (void)msg; // Suppress unused warning when asserts are disabled. intptr_t iter = PYUPB_WEAKMAP_BEGIN; const void* key; PyObject* obj;