git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2355b69)
Insert additional compiler placation into objectaddress.c.
2010年8月27日 21:31:19 +0000 (21:31 +0000)
2010年8月27日 21:31:19 +0000 (21:31 +0000)
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.


diff --git a/src/backend/catalog/objectaddress.c b/src/backend/catalog/objectaddress.c
index 9eec92f40a610eb2fbbe709bc9f7e46a1b02dca0..9054d75c9e30085155776fc4ae6d75acf9623e61 100644 (file)
--- a/src/backend/catalog/objectaddress.c
+++ b/src/backend/catalog/objectaddress.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/catalog/objectaddress.c,v 1.1 2010年08月27日 11:47:41 rhaas Exp $
+ * $PostgreSQL: pgsql/src/backend/catalog/objectaddress.c,v 1.2 2010年08月27日 21:31:19 rhaas Exp $
*
*-------------------------------------------------------------------------
*/
@@ -215,6 +215,10 @@ get_object_address(ObjectType objtype, List *objname, List *objargs,
break;
default:
elog(ERROR, "unrecognized objtype: %d", (int) objtype);
+ /* placate compiler, in case it things elog might return */
+ address.classId = InvalidOid;
+ address.objectId = InvalidOid;
+ address.objectSubId = 0;
}
/*
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /