Skip to content

Commit 493490c

Browse files
committed
Silence warning about uninitialized 'ret' variable on some compilers.
If the compiler doesn't notice that the switch-statement handles all possible values of the enum, it might complain that 'ret' is being used without initialization. Jeff Janes reported that on gcc 4.4.7. Discussion: https://www.postgresql.org/message-id/CAMkU=1x31RvP+cpooFbmc8K8nt-gNO8woGFhXcgQYYZ5ozYpFA@mail.gmail.com
1 parent e11e24b commit 493490c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/interfaces/libpq/fe-connect.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1668,6 +1668,7 @@ connectDBStart(PGconn *conn)
16681668
snprintf(portstr, sizeof(portstr), "%d", thisport);
16691669

16701670
/* Use pg_getaddrinfo_all() to resolve the address */
1671+
ret = 1;
16711672
switch (ch->type)
16721673
{
16731674
case CHT_HOST_NAME:

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