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

Lines changed: 5 additions & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy