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

Commit 462583b

Browse files
committed
Insert additional compiler placation into objectaddress.c.
Peter Eisentraut reports that some bits of the "address" variable in get_object_address() give "may be used uninitialized" warnings; this likes the only excuse his compiler could have for thinking that's possible.
1 parent 2355b69 commit 462583b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/backend/catalog/objectaddress.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/catalog/objectaddress.c,v 1.1 2010/08/27 11:47:41 rhaas Exp $
11+
* $PostgreSQL: pgsql/src/backend/catalog/objectaddress.c,v 1.2 2010/08/27 21:31:19 rhaas Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -215,6 +215,10 @@ get_object_address(ObjectType objtype, List *objname, List *objargs,
215215
break;
216216
default:
217217
elog(ERROR, "unrecognized objtype: %d", (int) objtype);
218+
/* placate compiler, in case it things elog might return */
219+
address.classId = InvalidOid;
220+
address.objectId = InvalidOid;
221+
address.objectSubId = 0;
218222
}
219223

220224
/*

0 commit comments

Comments
 (0)