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

Commitdd16f94

Browse files
committed
Remove unreachable code
The Solaris Studio compiler warns about these instances, unlike moremainstream compilers such as gcc. But manual inspection showed thatthe code is clearly not reachable, and we hope no worthy compiler willcomplain about removing this code.
1 parenta76c857 commitdd16f94

File tree

20 files changed

+2
-43
lines changed

20 files changed

+2
-43
lines changed

‎contrib/hstore/hstore_io.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,6 @@ get_val(HSParser *state, bool ignoreeq, bool *escaped)
163163

164164
state->ptr++;
165165
}
166-
167-
return false;
168166
}
169167

170168
#defineWKEY0

‎contrib/intarray/_int_bool.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ gettoken(WORKSTATE *state, int32 *val)
136136
}
137137
(state->buf)++;
138138
}
139-
returnEND;
140139
}
141140

142141
/*
@@ -301,7 +300,6 @@ execute(ITEM *curitem, void *checkval, bool calcnot,
301300
else
302301
returnexecute(curitem-1,checkval,calcnot,chkcond);
303302
}
304-
return false;
305303
}
306304

307305
/*
@@ -404,7 +402,6 @@ contains_required_value(ITEM *curitem)
404402
else
405403
return false;
406404
}
407-
return false;
408405
}
409406

410407
bool

‎contrib/intarray/_int_gist.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,6 @@ g_int_compress(PG_FUNCTION_ARGS)
217217
}
218218
else
219219
PG_RETURN_POINTER(entry);
220-
221-
PG_RETURN_POINTER(entry);
222220
}
223221

224222
Datum

‎contrib/ltree/ltxtquery_io.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ gettoken_query(QPRS_STATE *state, int32 *val, int32 *lenval, char **strval, uint
139139

140140
state->buf+=charlen;
141141
}
142-
returnEND;
143142
}
144143

145144
/*

‎contrib/ltree/ltxtquery_op.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ ltree_execute(ITEM *curitem, void *checkval, bool calcnot, bool (*chkcond) (void
4040
else
4141
returnltree_execute(curitem+1,checkval,calcnot,chkcond);
4242
}
43-
return false;
4443
}
4544

4645
typedefstruct

‎src/backend/access/gin/ginbtree.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,6 @@ ginFindLeafPage(GinBtree btree, GinBtreeStack *stack)
146146
stack->predictNumber=1;
147147
}
148148
}
149-
150-
/* keep compiler happy */
151-
returnNULL;
152149
}
153150

154151
void

‎src/backend/access/gin/ginget.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,6 @@ collectMatchBitmap(GinBtreeData *btree, GinBtreeStack *stack,
354354
*/
355355
stack->off++;
356356
}
357-
358-
return true;
359357
}
360358

361359
/*

‎src/backend/access/gist/gistget.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,6 @@ gistgettuple(PG_FUNCTION_ARGS)
535535
}while (so->nPageData==0);
536536
}
537537
}
538-
539-
PG_RETURN_BOOL(false);/* keep compiler quiet */
540538
}
541539

542540
/*

‎src/backend/executor/nodeGroup.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,6 @@ ExecGroup(GroupState *node)
184184
else
185185
InstrCountFiltered1(node,1);
186186
}
187-
188-
/* NOTREACHED */
189-
returnNULL;
190187
}
191188

192189
/* -----------------

‎src/backend/libpq/be-secure.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,9 @@ secure_loaded_verify_locations(void)
201201
{
202202
#ifdefUSE_SSL
203203
returnssl_loaded_verify_locations;
204-
#endif
205-
204+
#else
206205
return false;
206+
#endif
207207
}
208208

209209
/*

‎src/backend/storage/buffer/freelist.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,6 @@ StrategyGetBuffer(BufferAccessStrategy strategy, bool *lock_held)
233233
}
234234
UnlockBufHdr(buf);
235235
}
236-
237-
/* not reached */
238-
returnNULL;
239236
}
240237

241238
/*

‎src/backend/tcop/postgres.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4198,11 +4198,6 @@ PostgresMain(int argc, char *argv[], const char *username)
41984198
firstchar)));
41994199
}
42004200
}/* end of input-reading loop */
4201-
4202-
/* can't get here because the above loop never exits */
4203-
Assert(false);
4204-
4205-
abort();/* keep compiler quiet */
42064201
}
42074202

42084203

‎src/backend/tsearch/dict_thesaurus.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -744,8 +744,6 @@ findVariant(LexemeInfo *in, LexemeInfo *stored, uint16 curpos, LexemeInfo **newi
744744
for (i=0;i<newn;i++)
745745
newin[i]=newin[i]->nextentry;
746746
}
747-
748-
returnNULL;
749747
}
750748

751749
staticTSLexeme*

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1439,7 +1439,6 @@ get_th(char *num, int type)
14391439
returnnumTH[3];
14401440
returnnumth[3];
14411441
}
1442-
returnNULL;
14431442
}
14441443

14451444
/* ----------

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ gettoken_query(TSQueryParserState state,
216216
}
217217
state->buf+=pg_mblen(state->buf);
218218
}
219-
returnPT_END;
220219
}
221220

222221
/*

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,4 @@ gettoken_tsvector(TSVectorParseState state,
362362
/* get next char */
363363
state->prsbuf+=pg_mblen(state->prsbuf);
364364
}
365-
366-
return false;
367365
}

‎src/bin/pg_basebackup/pg_receivexlog.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,4 @@ main(int argc, char **argv)
435435
pg_usleep(RECONNECT_SLEEP_TIME*1000000);
436436
}
437437
}
438-
439-
/* Never get here */
440-
exit(2);
441438
}

‎src/bin/psql/variables.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,6 @@ ParseVariableBool(const char *value)
115115
psql_error("unrecognized Boolean value; assuming \"on\"\n");
116116
return true;
117117
}
118-
/* suppress compiler warning */
119-
return true;
120118
}
121119

122120

‎src/interfaces/ecpg/ecpglib/typename.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ ecpg_type_name(enum ECPGttype typ)
6565
default:
6666
abort();
6767
}
68-
returnNULL;
6968
}
7069

7170
int

‎src/pl/plpgsql/src/pl_exec.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1663,8 +1663,6 @@ exec_stmt_loop(PLpgSQL_execstate *estate, PLpgSQL_stmt_loop *stmt)
16631663
elog(ERROR,"unrecognized rc: %d",rc);
16641664
}
16651665
}
1666-
1667-
returnPLPGSQL_RC_OK;
16681666
}
16691667

16701668

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp