diff options
-rw-r--r-- | meson/suppressions/meson.build | 8 | ||||
-rw-r--r-- | src/.clang-tidy | 1 | ||||
-rw-r--r-- | src/reader.c | 2 | ||||
-rw-r--r-- | src/serdi.c | 2 | ||||
-rw-r--r-- | src/writer.c | 2 |
5 files changed, 12 insertions, 3 deletions
diff --git a/meson/suppressions/meson.build b/meson/suppressions/meson.build index 098f7ab5..11286442 100644 --- a/meson/suppressions/meson.build +++ b/meson/suppressions/meson.build @@ -36,6 +36,14 @@ if is_variable('cc') ] endif + if host_machine.system() == 'windows' + c_suppressions += [ + '-Wno-deprecated-declarations', + '-Wno-nonportable-system-include-path', + '-Wno-unused-macros', + ] + endif + elif cc.get_id() == 'gcc' c_suppressions += [ '-Wno-cast-align', diff --git a/src/.clang-tidy b/src/.clang-tidy index 8f408ddc..638041cc 100644 --- a/src/.clang-tidy +++ b/src/.clang-tidy @@ -14,5 +14,6 @@ Checks: > -hicpp-signed-bitwise, -llvm-header-guard, -misc-no-recursion, + -modernize-macro-to-enum, -readability-function-cognitive-complexity, InheritParentConfig: true diff --git a/src/reader.c b/src/reader.c index 113c3e57..b386a76e 100644 --- a/src/reader.c +++ b/src/reader.c @@ -19,7 +19,7 @@ SerdStatus r_err(SerdReader* const reader, const SerdStatus st, const char* const fmt, ...) { - va_list args; + va_list args; // NOLINT(cppcoreguidelines-init-variables) va_start(args, fmt); const Cursor* const cur = &reader->source.cur; const SerdError e = {st, cur->filename, cur->line, cur->col, fmt, &args}; diff --git a/src/serdi.c b/src/serdi.c index a5a00c57..462d7909 100644 --- a/src/serdi.c +++ b/src/serdi.c @@ -8,7 +8,7 @@ #ifdef _WIN32 # ifdef _MSC_VER -# define WIN32_LEAN_AND_MEAN 1 +# define WIN32_LEAN_AND_MEAN # endif # include <fcntl.h> # include <io.h> diff --git a/src/writer.c b/src/writer.c index 341ee79b..575d3fb9 100644 --- a/src/writer.c +++ b/src/writer.c @@ -130,7 +130,7 @@ w_err(SerdWriter* writer, SerdStatus st, const char* fmt, ...) add a Cursor parameter so the source can notify the writer of the statement origin for better error reporting. */ - va_list args; + va_list args; // NOLINT(cppcoreguidelines-init-variables) va_start(args, fmt); const SerdError e = {st, (const uint8_t*)"", 0, 0, fmt, &args}; serd_error(writer->error_sink, writer->error_handle, &e); |