From 58abb465063553e9a540d634b99170ebee79eb2d Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Mon, 30 Nov 2015 18:39:50 +0000 Subject: [PATCH] Remove warnings building against 9.6, closes #3385 git-svn-id: http://svn.osgeo.org/postgis/trunk@14460 b70326c6-7e19-0410-871a-916f4a2858ee --- libpgcommon/lwgeom_transform.c | 10 ++++++++++ postgis/lwgeom_geos_prepared.c | 11 ++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/libpgcommon/lwgeom_transform.c b/libpgcommon/lwgeom_transform.c index 608fa0aa8..b27c7f651 100644 --- a/libpgcommon/lwgeom_transform.c +++ b/libpgcommon/lwgeom_transform.c @@ -92,7 +92,13 @@ static void PROJ4SRSCacheInit(MemoryContext context); static void PROJ4SRSCacheDelete(MemoryContext context); static void PROJ4SRSCacheReset(MemoryContext context); static bool PROJ4SRSCacheIsEmpty(MemoryContext context); + +#if POSTGIS_PGSQL_VERSION >= 96 +static void PROJ4SRSCacheStats(MemoryContext context, int level, bool print, MemoryContextCounters *totals); +#else static void PROJ4SRSCacheStats(MemoryContext context, int level); +#endif + #ifdef MEMORY_CONTEXT_CHECKING static void PROJ4SRSCacheCheck(MemoryContext context); #endif @@ -165,7 +171,11 @@ PROJ4SRSCacheIsEmpty(MemoryContext context) } static void +#if POSTGIS_PGSQL_VERSION >= 96 +PROJ4SRSCacheStats(MemoryContext context, int level, bool print, MemoryContextCounters *totals) +#else PROJ4SRSCacheStats(MemoryContext context, int level) +#endif { /* * Simple stats display function - we must supply a function since this call is mandatory according to tgl diff --git a/postgis/lwgeom_geos_prepared.c b/postgis/lwgeom_geos_prepared.c index 8e7e10d33..54cf7cfcd 100644 --- a/postgis/lwgeom_geos_prepared.c +++ b/postgis/lwgeom_geos_prepared.c @@ -86,7 +86,12 @@ static void PreparedCacheInit(MemoryContext context); static void PreparedCacheReset(MemoryContext context); static void PreparedCacheDelete(MemoryContext context); static bool PreparedCacheIsEmpty(MemoryContext context); +#if POSTGIS_PGSQL_VERSION >= 96 +static void PreparedCacheStats(MemoryContext context, int level, bool print, MemoryContextCounters *totals); +#else static void PreparedCacheStats(MemoryContext context, int level); +#endif + #ifdef MEMORY_CONTEXT_CHECKING static void PreparedCacheCheck(MemoryContext context); #endif @@ -160,14 +165,18 @@ PreparedCacheIsEmpty(MemoryContext context) } static void +#if POSTGIS_PGSQL_VERSION >= 96 +PreparedCacheStats(MemoryContext context, int level, bool print, MemoryContextCounters *totals) +#else PreparedCacheStats(MemoryContext context, int level) +#endif { /* * Simple stats display function - we must supply a function since this call is mandatory according to tgl * (see postgis-devel archives July 2007) + fprintf(stderr, "%s: Prepared context\n", context->name); */ - fprintf(stderr, "%s: Prepared context\n", context->name); } #ifdef MEMORY_CONTEXT_CHECKING -- 2.40.0