agora inbox for [email protected]  
help / color / mirror / Atom feed
From: Alvaro Herrera <[email protected]>
Subject: [PATCH 4/5] silence compiler warning
Date: Mon, 23 Mar 2020 18:50:59 -0300

---
 src/backend/utils/fmgr/funcapi.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/backend/utils/fmgr/funcapi.c b/src/backend/utils/fmgr/funcapi.c
index ab24359981..3bfefcf48a 100644
--- a/src/backend/utils/fmgr/funcapi.c
+++ b/src/backend/utils/fmgr/funcapi.c
@@ -508,10 +508,13 @@ resolve_anyelement_from_others(polymorphic_actuals *actuals)
 	else if (OidIsValid(actuals->anymultirange_type))
 	{
 		/* Use the element type based on the multirange type */
-		Oid			multirange_base_type = getBaseType(actuals->anymultirange_type);
-		Oid			multirange_typelem =
-			get_range_multirange_subtype(multirange_base_type);
+		Oid			multirange_base_type;
+		Oid			multirange_typelem;
+		Oid			range_base_type;
+		Oid			range_typelem;
 
+		multirange_base_type = getBaseType(actuals->anymultirange_type);
+		multirange_typelem = get_range_multirange_subtype(multirange_base_type);
 		if (!OidIsValid(multirange_typelem))
 			ereport(ERROR,
 					(errcode(ERRCODE_DATATYPE_MISMATCH),
@@ -519,8 +522,8 @@ resolve_anyelement_from_others(polymorphic_actuals *actuals)
 							"anymultirange",
 							format_type_be(multirange_base_type))));
 
-		Oid			range_base_type = getBaseType(multirange_typelem);
-		Oid			range_typelem = get_range_subtype(range_base_type);
+		range_base_type = getBaseType(multirange_typelem);
+		range_typelem = get_range_subtype(range_base_type);
 
 		if (!OidIsValid(range_typelem))
 			ereport(ERROR,
-- 
2.20.1


--CE+1k2dSO48ffgeK
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
 filename="0005-rename-get_range_multirange_subtype-to-get_multirang.patch"



view thread (7+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: [PATCH 4/5] silence compiler warning
  In-Reply-To: <no-message-id-199404@localhost>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox