From: Tomas Krizek Date: Thu, 21 Feb 2019 10:36:04 +0000 (+0100) Subject: gitlabci: fix lint:pedantic X-Git-Tag: v4.0.0~24^2~75 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aaec7c9e7c7f4af952d4f0759a3bc8f7e805924c;p=thirdparty%2Fknot-resolver.git gitlabci: fix lint:pedantic --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 16f7124bf..e69bc3592 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -132,21 +132,18 @@ kres-gen: - docker lint:pedantic: - stage: test # could be in build already, but let's not block the test stage if this fails - dependencies: [] # do not download build artifacts - except: - - master - variables: - CFLAGS: -Werror -Wall -Wpedantic -ggdb -std=gnu11 - script: - - make -k all - - make clean - - make -k all CC=clang CXX=clang++ \ - CFLAGS="$CFLAGS -Wno-newline-eof -Wno-gnu-zero-variadic-macro-arguments -Wno-gnu-folding-constant" + <<: *test_nodep tags: - docker - linux - amd64 + script: + - meson build_pedantic_gcc -Dwerror=true -Dc_args='-Wpedantic' + - ninja -C build_pedantic_gcc + - > + CC=clang CXX=clang++ meson build_pedantic_clang -Dwerror=true -Dc_args=' + -Wpedantic -Wno-newline-eof -Wno-gnu-zero-variadic-macro-arguments -Wno-gnu-folding-constant' + - ninja -C build_pedantic_clang lint:lua: stage: test diff --git a/doc/build.rst b/doc/build.rst index 59ffdf599..359b4973d 100644 --- a/doc/build.rst +++ b/doc/build.rst @@ -4,7 +4,7 @@ Building from sources .. note:: Latest up-to-date packages for various distribution can be obtained from ``_ -Knot-resolver is written for UNIX-like systems, mainly in C99. +Knot-resolver is written for UNIX-like systems using modern C standards. Portable I/O is provided by libuv_. Some 64-bit systems with LuaJIT 2.1 may be affected by `a problem `_ @@ -64,7 +64,7 @@ tests. .. [#] If ``meson >= 0.47`` isn't available for your distro, check backports repository oor use python pip to install it. -.. [#] Requires C99, ``__attribute__((cleanup))`` and ``-MMD -MP`` for +.. [#] Requires ``__attribute__((cleanup))`` and ``-MMD -MP`` for dependency file generation. GCC, Clang and ICC are supported. .. [#] You can use variables ``_CFLAGS`` and ``_LIBS`` to configure dependencies manually (i.e. ``libknot_CFLAGS`` and diff --git a/meson.build b/meson.build index 20994fbed..a7bfec917 100644 --- a/meson.build +++ b/meson.build @@ -3,7 +3,7 @@ project( ['c', 'cpp'], license: 'GPLv3+', version: '3.2.1', - default_options: ['c_std=c99', 'b_ndebug=if-release'], + default_options: ['c_std=gnu11', 'b_ndebug=if-release'], meson_version: '>=0.47.0', )