Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita46ca61

Browse files
committed
Suppress a few 'uninitialized variable' warnings that gcc emits only at
-O3 or higher (presumably because it inlines more things). Per gripefrom Mark Mielke.
1 parentd13f372 commita46ca61

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

‎src/backend/access/nbtree/nbtinsert.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.145 2006/11/01 19:43:17 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.146 2006/11/11 01:14:18 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1082,6 +1082,9 @@ _bt_findsplitloc(Relation rel,
10821082
BTREE_DEFAULT_FILLFACTOR);
10831083
else
10841084
state.fillfactor=BTREE_NONLEAF_FILLFACTOR;
1085+
state.newitemonleft= false;/* these just to keep compiler quiet */
1086+
state.firstright=0;
1087+
state.best_delta=0;
10851088

10861089
/* Total free space available on a btree page, after fixed overhead */
10871090
leftspace=rightspace=

‎src/backend/optimizer/path/costsize.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
* Portions Copyright (c) 1994, Regents of the University of California
5555
*
5656
* IDENTIFICATION
57-
* $PostgreSQL: pgsql/src/backend/optimizer/path/costsize.c,v 1.168 2006/11/10 01:21:41 tgl Exp $
57+
* $PostgreSQL: pgsql/src/backend/optimizer/path/costsize.c,v 1.169 2006/11/11 01:14:19 tgl Exp $
5858
*
5959
*-------------------------------------------------------------------------
6060
*/
@@ -626,7 +626,10 @@ cost_bitmap_tree_node(Path *path, Cost *cost, Selectivity *selec)
626626
*selec= ((BitmapOrPath*)path)->bitmapselectivity;
627627
}
628628
else
629+
{
629630
elog(ERROR,"unrecognized node type: %d",nodeTag(path));
631+
*cost=*selec=0;/* keep compiler quiet */
632+
}
630633
}
631634

632635
/*

‎src/backend/utils/adt/timestamp.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/adt/timestamp.c,v 1.168 2006/10/04 00:29:59 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/adt/timestamp.c,v 1.169 2006/11/11 01:14:19 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1257,7 +1257,10 @@ tm2timestamp(struct pg_tm * tm, fsec_t fsec, int *tzp, Timestamp *result)
12571257

12581258
/* Julian day routines are not correct for negative Julian days */
12591259
if (!IS_VALID_JULIAN(tm->tm_year,tm->tm_mon,tm->tm_mday))
1260+
{
1261+
*result=0;/* keep compiler quiet */
12601262
return-1;
1263+
}
12611264

12621265
date=date2j(tm->tm_year,tm->tm_mon,tm->tm_mday)-POSTGRES_EPOCH_JDATE;
12631266
time=time2t(tm->tm_hour,tm->tm_min,tm->tm_sec,fsec);
@@ -1266,11 +1269,17 @@ tm2timestamp(struct pg_tm * tm, fsec_t fsec, int *tzp, Timestamp *result)
12661269
*result=date*USECS_PER_DAY+time;
12671270
/* check for major overflow */
12681271
if ((*result-time) /USECS_PER_DAY!=date)
1272+
{
1273+
*result=0;/* keep compiler quiet */
12691274
return-1;
1275+
}
12701276
/* check for just-barely overflow (okay except time-of-day wraps) */
12711277
if ((*result<0&&date >=0)||
12721278
(*result >=0&&date<0))
1279+
{
1280+
*result=0;/* keep compiler quiet */
12731281
return-1;
1282+
}
12741283
#else
12751284
*result=date*SECS_PER_DAY+time;
12761285
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp