Skip to content

Commit e23b146

Browse files
committed
fix warning for PostgreSQL 10
1 parent 661d346 commit e23b146

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/stmtwalk.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ static void check_stmts(PLpgSQL_checkstate *cstate, List *stmts, int *closing, L
2424
static PLpgSQL_stmt_stack_item * push_stmt_to_stmt_stack(PLpgSQL_checkstate *cstate);
2525
static void pop_stmt_from_stmt_stack(PLpgSQL_checkstate *cstate);
2626
static bool is_any_loop_stmt(PLpgSQL_stmt *stmt);
27-
static bool is_inside_protected_block(PLpgSQL_stmt_stack_item *current);
2827
static bool is_inside_exception_handler(PLpgSQL_stmt_stack_item *current);
2928
static PLpgSQL_stmt * find_nearest_loop(PLpgSQL_stmt_stack_item *current);
3029
static PLpgSQL_stmt * find_stmt_with_label(char *label, PLpgSQL_stmt_stack_item *current);
@@ -45,6 +44,12 @@ static void check_dynamic_sql(PLpgSQL_checkstate *cstate, PLpgSQL_stmt *stmt, PL
4544

4645
#if PG_VERSION_NUM >= 110000
4746

47+
static bool is_inside_protected_block(PLpgSQL_stmt_stack_item *current);
48+
49+
#endif
50+
51+
#if PG_VERSION_NUM >= 110000
52+
4853
static void
4954
check_variable(PLpgSQL_checkstate *cstate, PLpgSQL_variable *var)
5055
{
@@ -1588,6 +1593,8 @@ find_nearest_loop(PLpgSQL_stmt_stack_item *current)
15881593
return NULL;
15891594
}
15901595

1596+
#if PG_VERSION_NUM >= 110000
1597+
15911598
/*
15921599
* Returns true, when some outer block handles exceptions.
15931600
* It is used for check of correct usage of COMMIT or ROLLBACK.
@@ -1611,6 +1618,8 @@ is_inside_protected_block(PLpgSQL_stmt_stack_item *current)
16111618
return false;
16121619
}
16131620

1621+
#endif
1622+
16141623
/*
16151624
* This is used for check of correct usage GET STACKED DIAGNOSTICS
16161625
*/

0 commit comments

Comments
 (0)