Skip to content

Commit 05fc551

Browse files
committed
Silence compiler warnings introduced by d87d548.
Reported-by: Justin Pryzby Discussion: https://postgr.es/m/20230224002029.GQ1653@telsasoft.com
1 parent 62d56f6 commit 05fc551

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/backend/utils/adt/pg_locale.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2105,6 +2105,7 @@ pg_strxfrm_libc(char *dest, const char *src, size_t destsize,
21052105
#else
21062106
/* shouldn't happen */
21072107
elog(ERROR, "unsupported collprovider: %c", locale->provider);
2108+
return 0; /* keep compiler quiet */
21082109
#endif
21092110
}
21102111

@@ -2300,6 +2301,8 @@ pg_strxfrm_enabled(pg_locale_t locale)
23002301
else
23012302
/* shouldn't happen */
23022303
elog(ERROR, "unsupported collprovider: %c", locale->provider);
2304+
2305+
return false; /* keep compiler quiet */
23032306
}
23042307

23052308
/*
@@ -2385,6 +2388,8 @@ pg_strxfrm_prefix_enabled(pg_locale_t locale)
23852388
else
23862389
/* shouldn't happen */
23872390
elog(ERROR, "unsupported collprovider: %c", locale->provider);
2391+
2392+
return false; /* keep compiler quiet */
23882393
}
23892394

23902395
/*
@@ -2404,7 +2409,7 @@ size_t
24042409
pg_strxfrm_prefix(char *dest, const char *src, size_t destsize,
24052410
pg_locale_t locale)
24062411
{
2407-
size_t result;
2412+
size_t result = 0; /* keep compiler quiet */
24082413

24092414
if (!locale || locale->provider == COLLPROVIDER_LIBC)
24102415
elog(ERROR, "collprovider '%c' does not support pg_strxfrm_prefix()",
@@ -2441,7 +2446,7 @@ size_t
24412446
pg_strnxfrm_prefix(char *dest, size_t destsize, const char *src,
24422447
size_t srclen, pg_locale_t locale)
24432448
{
2444-
size_t result;
2449+
size_t result = 0; /* keep compiler quiet */
24452450

24462451
if (!locale || locale->provider == COLLPROVIDER_LIBC)
24472452
elog(ERROR, "collprovider '%c' does not support pg_strnxfrm_prefix()",

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