Skip to content

Commit 7c0ddca

Browse files
committed
Fix char->bool conversion warnings
1 parent 04b8b08 commit 7c0ddca

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

vops_fdw.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ postgresReScanForeignScan(ForeignScanState *node)
785785
{
786786
PgFdwScanState *fsstate = (PgFdwScanState *) node->fdw_state;
787787
Datum* values = NULL;
788-
bool* nulls = NULL;
788+
char* nulls = NULL;
789789
MemoryContext oldcontext = MemoryContextSwitchTo(fsstate->spi_context);
790790
Oid* argtypes = NULL;
791791
int rc;
@@ -798,20 +798,22 @@ postgresReScanForeignScan(ForeignScanState *node)
798798
int i = 0;
799799

800800
values = palloc(sizeof(Datum)*fsstate->numParams);
801-
nulls = palloc(sizeof(bool)*fsstate->numParams);
801+
nulls = palloc(sizeof(char)*fsstate->numParams);
802802
argtypes = palloc(sizeof(Oid)*fsstate->numParams);
803803

804804
foreach(lc, param_exprs)
805805
{
806806
ExprState *expr_state = (ExprState *) lfirst(lc);
807807
/* Evaluate the parameter expression */
808+
bool isNull;
808809
#if PG_VERSION_NUM<100000
809810
ExprDoneCond isDone;
810-
values[i] = ExecEvalExpr(expr_state, econtext, &nulls[i], &isDone);
811+
values[i] = ExecEvalExpr(expr_state, econtext, &isNull, &isDone);
811812
#else
812-
values[i] = ExecEvalExpr(expr_state, econtext, &nulls[i]);
813+
values[i] = ExecEvalExpr(expr_state, econtext, &isNull);
813814
#endif
814815
argtypes[i] = exprType((Node*)expr_state->expr);
816+
nulls[i] = (char)isNull;
815817
i += 1;
816818
}
817819
}

0 commit comments

Comments
 (0)