From: Vladimír Čunát Date: Thu, 22 Nov 2018 16:50:33 +0000 (+0100) Subject: disable more -Wpedantic warnings via #pragma X-Git-Tag: v3.2.0~25^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9969ee4f461154c3e00b8dd515f99c15c0f4a06b;p=thirdparty%2Fknot-resolver.git disable more -Wpedantic warnings via #pragma --- diff --git a/contrib/ucw/mempool-fmt.c b/contrib/ucw/mempool-fmt.c index 101c4bd50..6c93e1e9a 100644 --- a/contrib/ucw/mempool-fmt.c +++ b/contrib/ucw/mempool-fmt.c @@ -14,6 +14,9 @@ #include #include +/* 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) { diff --git a/contrib/ucw/mempool.c b/contrib/ucw/mempool.c index f50c453a2..129b7336a 100644 --- a/contrib/ucw/mempool.c +++ b/contrib/ucw/mempool.c @@ -18,6 +18,9 @@ #include #include +/* 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) diff --git a/daemon/engine.c b/daemon/engine.c index 96ba0adfd..5eebe3dd6 100644 --- a/daemon/engine.c +++ b/daemon/engine.c @@ -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) {