Skip to content

Commit

Permalink
code cleaning for gcc 15
Browse files Browse the repository at this point in the history
  • Loading branch information
okbob committed Feb 6, 2025
1 parent 31ed772 commit d6f521e
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 10 deletions.
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ endif
REGRESS_OPTS = --dbname=$(PL_TESTDB)
REGRESS = plpgsql_check_passive plpgsql_check_active plpgsql_check_active-$(MAJORVERSION) plpgsql_check_passive-$(MAJORVERSION)

override CFLAGS +="-Wno-error=incompatible-pointer-types"

ifdef NO_PGXS
subdir = contrib/plpgsql_check
top_builddir = ../..
Expand All @@ -25,4 +23,5 @@ PGXS := $(shell $(PG_CONFIG) --pgxs)
include $(PGXS)
endif

override CFLAGS += -Wno-error=incompatible-pointer-types -I$(top_builddir)/src/pl/plpgsql/src -Wall -g
# temorary fix of compilation with gcc 15
override CFLAGS += -Wno-error=incompatible-pointer-types -I$(top_builddir)/src/pl/plpgsql/src -Wall -g
4 changes: 1 addition & 3 deletions src/check_expr.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
#include "catalog/pg_type.h"
#include "executor/spi_priv.h"
#include "optimizer/clauses.h"

#include "nodes/print.h"
#include "optimizer/optimizer.h"
#include "parser/parse_node.h"

Expand Down Expand Up @@ -439,7 +437,7 @@ check_pure_expr(PLpgSQL_checkstate *cstate, Query *query, char *query_str)
if (!is_pure_expr(cstate, query))
{
plpgsql_check_put_error(cstate,
0, 0,
ERRCODE_SYNTAX_ERROR, 0,
"expression is not pure expression",
"there is a possibility of unwanted behave",
NULL,
Expand Down
2 changes: 0 additions & 2 deletions src/cursors_leaks.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ typedef struct
LocalTransactionId lxid;
} CursorLeaksPlugin2Info;

MemoryContextCallback contextCallback;

static LocalTransactionId traces_lxid = InvalidLocalTransactionId;
static HTAB *traces = NULL;
static MemoryContext traces_mcxt = NULL;
Expand Down
2 changes: 1 addition & 1 deletion src/pldbgapi2.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ static PLpgSQL_plugin pldbgapi2_plugin = { pldbgapi2_func_setup,

static PLpgSQL_plugin *prev_plpgsql_plugin = NULL;

MemoryContext pldbgapi2_mcxt = NULL;
static MemoryContext pldbgapi2_mcxt = NULL;

typedef struct pldbgapi2_plugin_info
{
Expand Down
1 change: 0 additions & 1 deletion src/plpgsql_check.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ PG_MODULE_MAGIC;
#endif

PLpgSQL_plugin **plpgsql_check_plugin_var_ptr;
PLpgSQL_plugin *prev_plpgsql_plugin;

static const struct config_enum_entry plpgsql_check_mode_options[] = {
{"disabled", PLPGSQL_CHECK_MODE_DISABLED, false},
Expand Down

0 comments on commit d6f521e

Please sign in to comment.