aboutsummaryrefslogtreecommitdiff
path: root/ext/misc/json1.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/misc/json1.c')
-rw-r--r--ext/misc/json1.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/misc/json1.c b/ext/misc/json1.c
index 3c63b6e94..99d299c29 100644
--- a/ext/misc/json1.c
+++ b/ext/misc/json1.c
@@ -31,7 +31,11 @@ SQLITE_EXTENSION_INIT1
#include <stdlib.h>
#include <stdarg.h>
-#define UNUSED_PARAM(X) (void)(X)
+/* Mark a function parameter as unused, to suppress nuisance compiler
+** warnings. */
+#ifndef UNUSED_PARAM
+# define UNUSED_PARAM(X) (void)(X)
+#endif
#ifndef LARGEST_INT64
# define LARGEST_INT64 (0xffffffff|(((sqlite3_int64)0x7fffffff)<<32))
@@ -1552,6 +1556,7 @@ static void jsonArrayStep(
sqlite3_value **argv
){
JsonString *pStr;
+ UNUSED_PARAM(argc);
pStr = (JsonString*)sqlite3_aggregate_context(ctx, sizeof(*pStr));
if( pStr ){
if( pStr->zBuf==0 ){
@@ -1597,6 +1602,7 @@ static void jsonObjectStep(
JsonString *pStr;
const char *z;
u32 n;
+ UNUSED_PARAM(argc);
pStr = (JsonString*)sqlite3_aggregate_context(ctx, sizeof(*pStr));
if( pStr ){
if( pStr->zBuf==0 ){