Skip to content

Commit d6f521e

Browse files
committed
code cleaning for gcc 15
1 parent 31ed772 commit d6f521e

File tree

5 files changed

+4
-10
lines changed

5 files changed

+4
-10
lines changed

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ endif
1212
REGRESS_OPTS = --dbname=$(PL_TESTDB)
1313
REGRESS = plpgsql_check_passive plpgsql_check_active plpgsql_check_active-$(MAJORVERSION) plpgsql_check_passive-$(MAJORVERSION)
1414

15-
override CFLAGS +="-Wno-error=incompatible-pointer-types"
16-
1715
ifdef NO_PGXS
1816
subdir = contrib/plpgsql_check
1917
top_builddir = ../..
@@ -25,4 +23,5 @@ PGXS := $(shell $(PG_CONFIG) --pgxs)
2523
include $(PGXS)
2624
endif
2725

28-
override CFLAGS += -Wno-error=incompatible-pointer-types -I$(top_builddir)/src/pl/plpgsql/src -Wall -g
26+
# temorary fix of compilation with gcc 15
27+
override CFLAGS += -Wno-error=incompatible-pointer-types -I$(top_builddir)/src/pl/plpgsql/src -Wall -g

src/check_expr.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
#include "catalog/pg_type.h"
1919
#include "executor/spi_priv.h"
2020
#include "optimizer/clauses.h"
21-
22-
#include "nodes/print.h"
2321
#include "optimizer/optimizer.h"
2422
#include "parser/parse_node.h"
2523

@@ -439,7 +437,7 @@ check_pure_expr(PLpgSQL_checkstate *cstate, Query *query, char *query_str)
439437
if (!is_pure_expr(cstate, query))
440438
{
441439
plpgsql_check_put_error(cstate,
442-
0, 0,
440+
ERRCODE_SYNTAX_ERROR, 0,
443441
"expression is not pure expression",
444442
"there is a possibility of unwanted behave",
445443
NULL,

src/cursors_leaks.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ typedef struct
5252
LocalTransactionId lxid;
5353
} CursorLeaksPlugin2Info;
5454

55-
MemoryContextCallback contextCallback;
56-
5755
static LocalTransactionId traces_lxid = InvalidLocalTransactionId;
5856
static HTAB *traces = NULL;
5957
static MemoryContext traces_mcxt = NULL;

src/pldbgapi2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ static PLpgSQL_plugin pldbgapi2_plugin = { pldbgapi2_func_setup,
127127

128128
static PLpgSQL_plugin *prev_plpgsql_plugin = NULL;
129129

130-
MemoryContext pldbgapi2_mcxt = NULL;
130+
static MemoryContext pldbgapi2_mcxt = NULL;
131131

132132
typedef struct pldbgapi2_plugin_info
133133
{

src/plpgsql_check.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ PG_MODULE_MAGIC;
4747
#endif
4848

4949
PLpgSQL_plugin **plpgsql_check_plugin_var_ptr;
50-
PLpgSQL_plugin *prev_plpgsql_plugin;
5150

5251
static const struct config_enum_entry plpgsql_check_mode_options[] = {
5352
{"disabled", PLPGSQL_CHECK_MODE_DISABLED, false},

0 commit comments

Comments
 (0)