projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6ad3611
)
Silence complaint about dead assignment
author
Peter Eisentraut
<peter_e@gmx.net>
Tue, 30 Jan 2018 01:42:15 +0000
(20:42 -0500)
committer
Peter Eisentraut
<peter_e@gmx.net>
Tue, 30 Jan 2018 01:43:43 +0000
(20:43 -0500)
The preferred place for "placate compiler" assignments is after
elog(ERROR), not before it. Otherwise, scan-build complains about a
dead assignment.
src/backend/commands/tablecmds.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/commands/tablecmds.c
b/src/backend/commands/tablecmds.c
index ea03fd2ecf35c0ae931bc34e5640ccb5b60dd50f..37c7d6688190329b6bc28eb6ecc3158bc5044334 100644
(file)
--- 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 */
}
/*