Skip to content

Commit 96102a3

Browse files
committed
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.
1 parent eee50a8 commit 96102a3

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/backend/catalog/aclchk.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3359,7 +3359,7 @@ aclcheck_error(AclResult aclerr, ObjectType objtype,
33593359
break;
33603360
case ACLCHECK_NO_PRIV:
33613361
{
3362-
const char *msg;
3362+
const char *msg = "???";
33633363

33643364
switch (objtype)
33653365
{
@@ -3481,7 +3481,6 @@ aclcheck_error(AclResult aclerr, ObjectType objtype,
34813481
case OBJECT_TSTEMPLATE:
34823482
case OBJECT_USER_MAPPING:
34833483
elog(ERROR, "unsupported object type %d", objtype);
3484-
msg = "???";
34853484
}
34863485

34873486
ereport(ERROR,
@@ -3491,7 +3490,7 @@ aclcheck_error(AclResult aclerr, ObjectType objtype,
34913490
}
34923491
case ACLCHECK_NOT_OWNER:
34933492
{
3494-
const char *msg;
3493+
const char *msg = "???";
34953494

34963495
switch (objtype)
34973496
{
@@ -3616,7 +3615,6 @@ aclcheck_error(AclResult aclerr, ObjectType objtype,
36163615
case OBJECT_TSTEMPLATE:
36173616
case OBJECT_USER_MAPPING:
36183617
elog(ERROR, "unsupported object type %d", objtype);
3619-
msg = "???";
36203618
}
36213619

36223620
ereport(ERROR,

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