From e6864f4e5114e093957fe9be677ad0485030879a Mon Sep 17 00:00:00 2001 From: Sandro Santilli <strk@kbt.io> Date: Tue, 2 Jan 2018 15:11:08 +0000 Subject: [PATCH] ISO C90 forbids mixed declarations and code, fix corresponding warning git-svn-id: http://svn.osgeo.org/postgis/trunk@16215 b70326c6-7e19-0410-871a-916f4a2858ee --- extensions/address_standardizer/std_pg_hash.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extensions/address_standardizer/std_pg_hash.c b/extensions/address_standardizer/std_pg_hash.c index 082d52ae7..2bf2bfd39 100644 --- a/extensions/address_standardizer/std_pg_hash.c +++ b/extensions/address_standardizer/std_pg_hash.c @@ -364,6 +364,9 @@ AddToStdPortalCache(StdPortalCache *STDCache, char *lextab, char *gaztab, char * MemoryContext STDMemoryContext; MemoryContext old_context; STANDARDIZER *std = NULL; +#if POSTGIS_PGSQL_VERSION >= 96 + MemoryContextCallback *callback; +#endif DBG("Enter: AddToStdPortalCache"); std = CreateStd(lextab, gaztab, rultab); @@ -396,7 +399,7 @@ AddToStdPortalCache(StdPortalCache *STDCache, char *lextab, char *gaztab, char * /* PgSQL comments suggest allocating callback in the context */ /* being managed, so that the callback object gets cleaned along with */ /* the context */ - MemoryContextCallback *callback = MemoryContextAlloc(STDMemoryContext, sizeof(MemoryContextCallback)); + callback = MemoryContextAlloc(STDMemoryContext, sizeof(MemoryContextCallback)); callback->arg = (void*)(STDMemoryContext); callback->func = StdCacheDelete; MemoryContextRegisterResetCallback(STDMemoryContext, callback); -- 2.40.0