Commit dd16f948 authored by Peter Eisentraut's avatar Peter Eisentraut

Remove unreachable code

The Solaris Studio compiler warns about these instances, unlike more
mainstream compilers such as gcc.  But manual inspection showed that
the code is clearly not reachable, and we hope no worthy compiler will
complain about removing this code.
parent a76c857e
...@@ -163,8 +163,6 @@ get_val(HSParser *state, bool ignoreeq, bool *escaped) ...@@ -163,8 +163,6 @@ get_val(HSParser *state, bool ignoreeq, bool *escaped)
state->ptr++; state->ptr++;
} }
return false;
} }
#define WKEY 0 #define WKEY 0
......
...@@ -136,7 +136,6 @@ gettoken(WORKSTATE *state, int32 *val) ...@@ -136,7 +136,6 @@ gettoken(WORKSTATE *state, int32 *val)
} }
(state->buf)++; (state->buf)++;
} }
return END;
} }
/* /*
...@@ -301,7 +300,6 @@ execute(ITEM *curitem, void *checkval, bool calcnot, ...@@ -301,7 +300,6 @@ execute(ITEM *curitem, void *checkval, bool calcnot,
else else
return execute(curitem - 1, checkval, calcnot, chkcond); return execute(curitem - 1, checkval, calcnot, chkcond);
} }
return false;
} }
/* /*
...@@ -404,7 +402,6 @@ contains_required_value(ITEM *curitem) ...@@ -404,7 +402,6 @@ contains_required_value(ITEM *curitem)
else else
return false; return false;
} }
return false;
} }
bool bool
......
...@@ -217,8 +217,6 @@ g_int_compress(PG_FUNCTION_ARGS) ...@@ -217,8 +217,6 @@ g_int_compress(PG_FUNCTION_ARGS)
} }
else else
PG_RETURN_POINTER(entry); PG_RETURN_POINTER(entry);
PG_RETURN_POINTER(entry);
} }
Datum Datum
......
...@@ -139,7 +139,6 @@ gettoken_query(QPRS_STATE *state, int32 *val, int32 *lenval, char **strval, uint ...@@ -139,7 +139,6 @@ gettoken_query(QPRS_STATE *state, int32 *val, int32 *lenval, char **strval, uint
state->buf += charlen; state->buf += charlen;
} }
return END;
} }
/* /*
......
...@@ -40,7 +40,6 @@ ltree_execute(ITEM *curitem, void *checkval, bool calcnot, bool (*chkcond) (void ...@@ -40,7 +40,6 @@ ltree_execute(ITEM *curitem, void *checkval, bool calcnot, bool (*chkcond) (void
else else
return ltree_execute(curitem + 1, checkval, calcnot, chkcond); return ltree_execute(curitem + 1, checkval, calcnot, chkcond);
} }
return false;
} }
typedef struct typedef struct
......
...@@ -146,9 +146,6 @@ ginFindLeafPage(GinBtree btree, GinBtreeStack *stack) ...@@ -146,9 +146,6 @@ ginFindLeafPage(GinBtree btree, GinBtreeStack *stack)
stack->predictNumber = 1; stack->predictNumber = 1;
} }
} }
/* keep compiler happy */
return NULL;
} }
void void
......
...@@ -354,8 +354,6 @@ collectMatchBitmap(GinBtreeData *btree, GinBtreeStack *stack, ...@@ -354,8 +354,6 @@ collectMatchBitmap(GinBtreeData *btree, GinBtreeStack *stack,
*/ */
stack->off++; stack->off++;
} }
return true;
} }
/* /*
......
...@@ -535,8 +535,6 @@ gistgettuple(PG_FUNCTION_ARGS) ...@@ -535,8 +535,6 @@ gistgettuple(PG_FUNCTION_ARGS)
} while (so->nPageData == 0); } while (so->nPageData == 0);
} }
} }
PG_RETURN_BOOL(false); /* keep compiler quiet */
} }
/* /*
......
...@@ -184,9 +184,6 @@ ExecGroup(GroupState *node) ...@@ -184,9 +184,6 @@ ExecGroup(GroupState *node)
else else
InstrCountFiltered1(node, 1); InstrCountFiltered1(node, 1);
} }
/* NOTREACHED */
return NULL;
} }
/* ----------------- /* -----------------
......
...@@ -201,9 +201,9 @@ secure_loaded_verify_locations(void) ...@@ -201,9 +201,9 @@ secure_loaded_verify_locations(void)
{ {
#ifdef USE_SSL #ifdef USE_SSL
return ssl_loaded_verify_locations; return ssl_loaded_verify_locations;
#endif #else
return false; return false;
#endif
} }
/* /*
......
...@@ -233,9 +233,6 @@ StrategyGetBuffer(BufferAccessStrategy strategy, bool *lock_held) ...@@ -233,9 +233,6 @@ StrategyGetBuffer(BufferAccessStrategy strategy, bool *lock_held)
} }
UnlockBufHdr(buf); UnlockBufHdr(buf);
} }
/* not reached */
return NULL;
} }
/* /*
......
...@@ -4198,11 +4198,6 @@ PostgresMain(int argc, char *argv[], const char *username) ...@@ -4198,11 +4198,6 @@ PostgresMain(int argc, char *argv[], const char *username)
firstchar))); firstchar)));
} }
} /* end of input-reading loop */ } /* end of input-reading loop */
/* can't get here because the above loop never exits */
Assert(false);
abort(); /* keep compiler quiet */
} }
......
...@@ -744,8 +744,6 @@ findVariant(LexemeInfo *in, LexemeInfo *stored, uint16 curpos, LexemeInfo **newi ...@@ -744,8 +744,6 @@ findVariant(LexemeInfo *in, LexemeInfo *stored, uint16 curpos, LexemeInfo **newi
for (i = 0; i < newn; i++) for (i = 0; i < newn; i++)
newin[i] = newin[i]->nextentry; newin[i] = newin[i]->nextentry;
} }
return NULL;
} }
static TSLexeme * static TSLexeme *
......
...@@ -1439,7 +1439,6 @@ get_th(char *num, int type) ...@@ -1439,7 +1439,6 @@ get_th(char *num, int type)
return numTH[3]; return numTH[3];
return numth[3]; return numth[3];
} }
return NULL;
} }
/* ---------- /* ----------
......
...@@ -216,7 +216,6 @@ gettoken_query(TSQueryParserState state, ...@@ -216,7 +216,6 @@ gettoken_query(TSQueryParserState state,
} }
state->buf += pg_mblen(state->buf); state->buf += pg_mblen(state->buf);
} }
return PT_END;
} }
/* /*
......
...@@ -362,6 +362,4 @@ gettoken_tsvector(TSVectorParseState state, ...@@ -362,6 +362,4 @@ gettoken_tsvector(TSVectorParseState state,
/* get next char */ /* get next char */
state->prsbuf += pg_mblen(state->prsbuf); state->prsbuf += pg_mblen(state->prsbuf);
} }
return false;
} }
...@@ -435,7 +435,4 @@ main(int argc, char **argv) ...@@ -435,7 +435,4 @@ main(int argc, char **argv)
pg_usleep(RECONNECT_SLEEP_TIME * 1000000); pg_usleep(RECONNECT_SLEEP_TIME * 1000000);
} }
} }
/* Never get here */
exit(2);
} }
...@@ -115,8 +115,6 @@ ParseVariableBool(const char *value) ...@@ -115,8 +115,6 @@ ParseVariableBool(const char *value)
psql_error("unrecognized Boolean value; assuming \"on\"\n"); psql_error("unrecognized Boolean value; assuming \"on\"\n");
return true; return true;
} }
/* suppress compiler warning */
return true;
} }
......
...@@ -65,7 +65,6 @@ ecpg_type_name(enum ECPGttype typ) ...@@ -65,7 +65,6 @@ ecpg_type_name(enum ECPGttype typ)
default: default:
abort(); abort();
} }
return NULL;
} }
int int
......
...@@ -1663,8 +1663,6 @@ exec_stmt_loop(PLpgSQL_execstate *estate, PLpgSQL_stmt_loop *stmt) ...@@ -1663,8 +1663,6 @@ exec_stmt_loop(PLpgSQL_execstate *estate, PLpgSQL_stmt_loop *stmt)
elog(ERROR, "unrecognized rc: %d", rc); elog(ERROR, "unrecognized rc: %d", rc);
} }
} }
return PLPGSQL_RC_OK;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment