]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Disable C4090 in libisccfg
authorOndřej Surý <ondrej@isc.org>
Thu, 16 Apr 2020 08:28:52 +0000 (10:28 +0200)
committerOndřej Surý <ondrej@isc.org>
Thu, 16 Apr 2020 11:01:55 +0000 (13:01 +0200)
The MSVC detects mismatch of const qualifiers in cfg_map_{first,next}clause
functions just in BIND 9.11.  As this is harmless in this particular
case, just disable the warning for these two functions.

The warnings reported:

  lib\isccfg\parser.c(2160): warning C4090: '=': different 'const' qualifiers
  lib\isccfg\parser.c(2184): warning C4090: '=': different 'const' qualifiers

lib/isccfg/parser.c

index dd8707d8aa149f7e004a933a89ea427c8fbae14b..a454864b232cfeab1883e5d8c3dfd601c8b6637e 100644 (file)
@@ -2147,6 +2147,9 @@ cfg_map_count(const cfg_obj_t *mapobj) {
        return (isc_symtab_count(map->symtab));
 }
 
+#if _WIN32
+#pragma warning(disable : 4090)
+#endif
 const char *
 cfg_map_firstclause(const cfg_type_t *map, const void **clauses,
                    unsigned int *idx)
@@ -2169,8 +2172,14 @@ cfg_map_firstclause(const cfg_type_t *map, const void **clauses,
                        return (NULL);
        }
        return ((*clauseset)[*idx].name);
+#if _WIN32
+#pragma warning(default : 4090)
+#endif
 }
 
+#if _WIN32
+#pragma warning(disable : 4090)
+#endif
 const char *
 cfg_map_nextclause(const cfg_type_t *map, const void **clauses,
                   unsigned int *idx)
@@ -2194,6 +2203,9 @@ cfg_map_nextclause(const cfg_type_t *map, const void **clauses,
                        return (NULL);
        }
        return ((*clauseset)[*idx].name);
+#if _WIN32
+#pragma warning(default : 4090)
+#endif
 }
 
 /* Parse an arbitrary token, storing its raw text representation. */