Commit 9969ee4f authored by Vladimír Čunát's avatar Vladimír Čunát

disable more -Wpedantic warnings via #pragma

parent c5a90fd1
......@@ -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)
{
......
......@@ -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)
......
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment