From: Peter Eisentraut <peter_e@gmx.net>
Date: Tue, 30 Jan 2018 01:42:15 +0000 (-0500)
Subject: Silence complaint about dead assignment
X-Git-Tag: REL_11_BETA1~855
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=07e524d3e955a79b94918d076642b3ac8e84b65f;p=postgresql

Silence complaint about dead assignment

The preferred place for "placate compiler" assignments is after
elog(ERROR), not before it.  Otherwise, scan-build complains about a
dead assignment.
---

diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index ea03fd2ecf..37c7d66881 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -13251,8 +13251,8 @@ RangeVarCallbackForAlterRelation(const RangeVar *rv, Oid relid, Oid oldrelid,
 		reltype = ((AlterTableStmt *) stmt)->relkind;
 	else
 	{
-		reltype = OBJECT_TABLE; /* placate compiler */
 		elog(ERROR, "unrecognized node type: %d", (int) nodeTag(stmt));
+		reltype = OBJECT_TABLE; /* placate compiler */
 	}
 
 	/*