Remove attempts to quieten compiler static-checking
[users/heiko/exim.git] / src / src / lookups / json.c
index f476db3d97d276fcc78fa57757686954c58e2443..1a2ca0449e75c55180416abc7c6562e9f9db73da 100644 (file)
@@ -2,7 +2,7 @@
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
-/* Copyright (c) Jeremy Harris 2019 */
+/* Copyright (c) Jeremy Harris 2019-2020 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 #include "../exim.h"
@@ -80,7 +80,8 @@ return lf_check_file(fileno((FILE *)handle), filename, S_IFREG, modemask,
 
 static int
 json_find(void * handle, const uschar * filename, const uschar * keystring,
-  int length, uschar ** result, uschar ** errmsg, uint * do_cache)
+  int length, uschar ** result, uschar ** errmsg, uint * do_cache,
+  const uschar * opts)
 {
 FILE * f = handle;
 json_t * j, * j0;
@@ -88,9 +89,6 @@ json_error_t jerr;
 uschar * key;
 int sep = 0;
 
-length = length;       /* Keep picky compilers happy */
-do_cache = do_cache;   /* Keep picky compilers happy */
-
 rewind(f);
 if (!(j = json_loadf(f, 0, &jerr)))
   {
@@ -172,15 +170,15 @@ fprintf(f, "Library version: json: Jansonn version %s\n", JANSSON_VERSION);
 
 
 static lookup_info json_lookup_info = {
-  US"json",                      /* lookup name */
-  lookup_absfile,                /* uses absolute file name */
-  json_open,                  /* open function */
-  json_check,                 /* check function */
-  json_find,                  /* find function */
-  json_close,                 /* close function */
-  NULL,                          /* no tidy function */
-  NULL,                          /* no quoting function */
-  json_version_report         /* version reporting */
+  .name = US"json",                    /* lookup name */
+  .type = lookup_absfile,              /* uses absolute file name */
+  .open = json_open,                   /* open function */
+  .check = json_check,                 /* check function */
+  .find = json_find,                   /* find function */
+  .close = json_close,                 /* close function */
+  .tidy = NULL,                                /* no tidy function */
+  .quote = NULL,                       /* no quoting function */
+  .version_report = json_version_report         /* version reporting */
 };