Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 426cafc

Browse files
committed
Suppress compiler warning about potentially uninitialized variable.
Maybe some compilers are smart enough to not complain about the previous coding ... but mine isn't.
1 parent cc81d99 commit 426cafc

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/backend/commands/typecmds.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -2046,7 +2046,7 @@ AlterDomainValidateConstraint(List *names, char *constrName)
20462046
Relation conrel;
20472047
HeapTuple tup;
20482048
Form_pg_type typTup;
2049-
Form_pg_constraint con;
2049+
Form_pg_constraint con = NULL;
20502050
Form_pg_constraint copy_con;
20512051
char *conbin;
20522052
SysScanDesc scan;
@@ -2094,13 +2094,10 @@ AlterDomainValidateConstraint(List *names, char *constrName)
20942094
}
20952095

20962096
if (!found)
2097-
{
2098-
con = NULL; /* keep compiler quiet */
20992097
ereport(ERROR,
21002098
(errcode(ERRCODE_UNDEFINED_OBJECT),
21012099
errmsg("constraint \"%s\" of domain \"%s\" does not exist",
21022100
constrName, NameStr(con->conname))));
2103-
}
21042101

21052102
if (con->contype != CONSTRAINT_CHECK)
21062103
ereport(ERROR,

0 commit comments

Comments
 (0)