]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
disable more -Wpedantic warnings via #pragma
authorVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 22 Nov 2018 16:50:33 +0000 (17:50 +0100)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Mon, 26 Nov 2018 14:18:23 +0000 (15:18 +0100)
contrib/ucw/mempool-fmt.c
contrib/ucw/mempool.c
daemon/engine.c

index 101c4bd50fdf72e0eef243f6a078f9c5c225499d..6c93e1e9afb4bd747380d2130c2514d2f3fb2209 100644 (file)
@@ -14,6 +14,9 @@
 #include <stdio.h>
 #include <string.h>
 
+/* FIXME: migrate to Knot DNS version of mempools. */
+#pragma GCC diagnostic ignored "-Wpointer-arith"
+
 static char *
 mp_vprintf_at(struct mempool *mp, size_t ofs, const char *fmt, va_list args)
 {
index f50c453a2b3a590aae0799b577e3173a26fe4a7a..129b7336ac789aa42eb784f6fc542807284ae09b 100644 (file)
@@ -18,6 +18,9 @@
 #include <string.h>
 #include <stdlib.h>
 
+/* FIXME: migrate to Knot DNS version of mempools. */
+#pragma GCC diagnostic ignored "-Wpointer-arith"
+
 #define MP_CHUNK_TAIL ALIGN_TO(sizeof(struct mempool_chunk), CPU_STRUCT_ALIGN)
 #define MP_SIZE_MAX (SIZE_MAX - MP_CHUNK_TAIL - CPU_PAGE_SIZE)
 
index 96ba0adfd84ea33162bc4a5db5e13f4dff19441c..5eebe3dd63ec37d8df8b2ffb6287ecd3c30c374b 100644 (file)
@@ -258,6 +258,8 @@ int engine_set_moduledir(struct engine *engine, const char *moduledir) {
 
        /* Use module path for including Lua scripts */
        char l_paths[MAXPATHLEN] = { 0 };
+       #pragma GCC diagnostic push
+       #pragma GCC diagnostic ignored "-Wformat" /* %1$ is not in C standard */
        /* Save original package.path to package._path */
        snprintf(l_paths, MAXPATHLEN - 1,
                 "if package._path == nil then package._path = package.path end\n"
@@ -265,6 +267,7 @@ int engine_set_moduledir(struct engine *engine, const char *moduledir) {
                 "if package._cpath == nil then package._cpath = package.cpath end\n"
                 "package.cpath = '%1$s/?%2$s;'..package._cpath\n",
                 new_moduledir, LIBEXT);
+       #pragma GCC diagnostic pop
 
        int ret = l_dobytecode(engine->L, l_paths, strlen(l_paths), "");
        if (ret != 0) {