diff options
author | Ivan Komissarov <abbapoh@gmail.com> | 2020-04-04 22:48:06 +0200 |
---|---|---|
committer | Ivan Komissarov <ABBAPOH@gmail.com> | 2020-04-17 12:53:26 +0000 |
commit | 072291a5282c5dd2c1eebe2e8932d831bbbb3b43 (patch) | |
tree | 004589e0f5759b603bfd80a50ec7eb4e8cab8667 | |
parent | 99d009c0ae5558d86159206e7a27d4ed7e8ade28 (diff) |
clang-tidy: Suppress 'cppcoreguidelines-pro-type-cstyle-cast' warning
Also, treat it as an error
Change-Id: Ia2918ce83f2b27d8a039d2651c7edc2d40ccdbdc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r-- | .clang-tidy | 1 | ||||
-rw-r--r-- | src/plugins/scanner/cpp/cppscanner.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/.clang-tidy b/.clang-tidy index a1cfad4d5..e11794066 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -57,6 +57,7 @@ Checks: > WarningsAsErrors: > bugprone-*, + cppcoreguidelines-pro-type-cstyle-cast, google-*, misc-unused-*, modernize-*, diff --git a/src/plugins/scanner/cpp/cppscanner.cpp b/src/plugins/scanner/cpp/cppscanner.cpp index 4b7f0eb03..191a0f8d2 100644 --- a/src/plugins/scanner/cpp/cppscanner.cpp +++ b/src/plugins/scanner/cpp/cppscanner.cpp @@ -234,7 +234,7 @@ static void *openScanner(const unsigned short *filePath, const char *fileTags, i opaque->mapl = mapl; void *vmap = mmap(0, s.st_size, PROT_READ, MAP_PRIVATE, opaque->fd, 0); - if (vmap == MAP_FAILED) + if (vmap == MAP_FAILED) // NOLINT(cppcoreguidelines-pro-type-cstyle-cast) return nullptr; #else opaque->file.setFileName(opaque->fileName); |