Skip to content

Commit b82d5a2

Browse files
committed
Silence compiler warnings
Reported by Peter Eisentraut. Coding suggested by Tom Lane.
1 parent 83bed06 commit b82d5a2

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/backend/catalog/objectaddress.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2290,23 +2290,18 @@ get_object_namespace(const ObjectAddress *address)
22902290
int
22912291
read_objtype_from_string(const char *objtype)
22922292
{
2293-
ObjectType type;
22942293
int i;
22952294

22962295
for (i = 0; i < lengthof(ObjectTypeMap); i++)
22972296
{
22982297
if (strcmp(ObjectTypeMap[i].tm_name, objtype) == 0)
2299-
{
2300-
type = ObjectTypeMap[i].tm_type;
2301-
break;
2302-
}
2298+
return ObjectTypeMap[i].tm_type;
23032299
}
2304-
if (i >= lengthof(ObjectTypeMap))
2305-
ereport(ERROR,
2306-
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2307-
errmsg("unrecognized object type \"%s\"", objtype)));
2300+
ereport(ERROR,
2301+
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
2302+
errmsg("unrecognized object type \"%s\"", objtype)));
23082303

2309-
return type;
2304+
return -1; /* keep compiler quiet */
23102305
}
23112306

23122307
/*

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