From 96102a32a374c3b81ba9c2b24bcf1943a87a9ef6 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Fri, 19 Jan 2018 22:16:25 -0500 Subject: [PATCH] Suppress possibly-uninitialized-variable warnings. Apparently, Peter's compiler has faith that the switch test values here could never not be valid values of their enums. Mine does not, and I tend to agree with it. --- src/backend/catalog/aclchk.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/backend/catalog/aclchk.c b/src/backend/catalog/aclchk.c index de18610a91..1156627b9e 100644 --- a/src/backend/catalog/aclchk.c +++ b/src/backend/catalog/aclchk.c @@ -3359,7 +3359,7 @@ aclcheck_error(AclResult aclerr, ObjectType objtype, break; case ACLCHECK_NO_PRIV: { - const char *msg; + const char *msg = "???"; switch (objtype) { @@ -3481,7 +3481,6 @@ aclcheck_error(AclResult aclerr, ObjectType objtype, case OBJECT_TSTEMPLATE: case OBJECT_USER_MAPPING: elog(ERROR, "unsupported object type %d", objtype); - msg = "???"; } ereport(ERROR, @@ -3491,7 +3490,7 @@ aclcheck_error(AclResult aclerr, ObjectType objtype, } case ACLCHECK_NOT_OWNER: { - const char *msg; + const char *msg = "???"; switch (objtype) { @@ -3616,7 +3615,6 @@ aclcheck_error(AclResult aclerr, ObjectType objtype, case OBJECT_TSTEMPLATE: case OBJECT_USER_MAPPING: elog(ERROR, "unsupported object type %d", objtype); - msg = "???"; } ereport(ERROR,