[postgis-tickets] r16215 - ISO C90 forbids mixed declarations and code, fix corresponding warning
Sandro Santilli
strk at kbt.io
Tue Jan 2 07:11:09 PST 2018
Author: strk
Date: 2018-01-02 07:11:08 -0800 (Tue, 02 Jan 2018)
New Revision: 16215
Modified:
trunk/extensions/address_standardizer/std_pg_hash.c
Log:
ISO C90 forbids mixed declarations and code, fix corresponding warning
Modified: trunk/extensions/address_standardizer/std_pg_hash.c
===================================================================
--- trunk/extensions/address_standardizer/std_pg_hash.c 2018-01-02 14:09:50 UTC (rev 16214)
+++ trunk/extensions/address_standardizer/std_pg_hash.c 2018-01-02 15:11:08 UTC (rev 16215)
@@ -364,6 +364,9 @@
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 @@
/* 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);
More information about the postgis-tickets
mailing list