Skip to content

Commit 0df7f49

Browse files
committed
Clean up possibly-uninitialized-variable warnings reported by gcc 4.x.
1 parent 030d5bd commit 0df7f49

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

contrib/intarray/_int_bool.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ gettoken(WORKSTATE * state, int4 *val)
5858
char nnn[16],
5959
*curnnn;
6060

61+
*val = 0; /* default result */
62+
6163
curnnn = nnn;
6264
while (1)
6365
{

contrib/ltree/ltxtquery_io.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,13 +197,13 @@ pushval_asis(QPRS_STATE * state, int type, char *strval, int lenval, uint16 flag
197197
static int4
198198
makepol(QPRS_STATE * state)
199199
{
200-
int4 val,
200+
int4 val = 0,
201201
type;
202-
int4 lenval;
203-
char *strval;
202+
int4 lenval = 0;
203+
char *strval = NULL;
204204
int4 stack[STACKDEPTH];
205205
int4 lenstack = 0;
206-
uint16 flag;
206+
uint16 flag = 0;
207207

208208
while ((type = gettoken_query(state, &val, &lenval, &strval, &flag)) != END)
209209
{

contrib/tsearch2/query.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,13 +317,13 @@ pushval_morph(QPRS_STATE * state, int typeval, char *strval, int lenval, int2 we
317317
static int4
318318
makepol(QPRS_STATE * state, void (*pushval) (QPRS_STATE *, int, char *, int, int2))
319319
{
320-
int4 val,
320+
int4 val = 0,
321321
type;
322-
int4 lenval;
323-
char *strval;
322+
int4 lenval = 0;
323+
char *strval = NULL;
324324
int4 stack[STACKDEPTH];
325325
int4 lenstack = 0;
326-
int2 weight;
326+
int2 weight = 0;
327327

328328
while ((type = gettoken_query(state, &val, &lenval, &strval, &weight)) != END)
329329
{

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