Skip to content

Commit 9563afa

Browse files
committed
Suppress some 'variable may be used uninitialized' warnings from gcc 4.4.
1 parent b9e9775 commit 9563afa

File tree

1 file changed

+3
-1
lines changed
  • src/backend/libpq

1 file changed

+3
-1
lines changed

src/backend/libpq/ip.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/libpq/ip.c,v 1.44 2009/01/23 19:58:06 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/libpq/ip.c,v 1.45 2009/04/23 23:25:13 tgl Exp $
1212
*
1313
* This file and the IPV6 implementation were initially provided by
1414
* Nigel Kukard <nkukard@lbsd.net>, Linux Based Systems Design
@@ -394,6 +394,7 @@ pg_sockaddr_cidr_mask(struct sockaddr_storage * mask, char *numbits, int family)
394394

395395
if (bits < 0 || bits > 32)
396396
return -1;
397+
memset(&mask4, 0, sizeof(mask4));
397398
/* avoid "x << 32", which is not portable */
398399
if (bits > 0)
399400
maskl = (0xffffffffUL << (32 - (int) bits))
@@ -413,6 +414,7 @@ pg_sockaddr_cidr_mask(struct sockaddr_storage * mask, char *numbits, int family)
413414

414415
if (bits < 0 || bits > 128)
415416
return -1;
417+
memset(&mask6, 0, sizeof(mask6));
416418
for (i = 0; i < 16; i++)
417419
{
418420
if (bits <= 0)

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