From ad651857ee2435582115e7de0e50e645e0aa9fc7 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 11 Nov 2023 10:59:33 -0500 Subject: Suppress new warnings in clang-tidy 16 --- examples/.clang-tidy | 6 +++++- examples/cube_view.h | 2 +- examples/sybok.hpp | 6 +++--- test/.clang-tidy | 3 ++- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/examples/.clang-tidy b/examples/.clang-tidy index 500dff1..7dde8bb 100644 --- a/examples/.clang-tidy +++ b/examples/.clang-tidy @@ -1,4 +1,4 @@ -# Copyright 2020-2022 David Robillard +# Copyright 2020-2023 David Robillard # SPDX-License-Identifier: 0BSD OR ISC Checks: > @@ -13,6 +13,7 @@ Checks: > -cert-dcl37-c, -cert-dcl51-cpp, -cert-err33-c, + -cert-err34-c, -concurrency-mt-unsafe, -cppcoreguidelines-avoid-const-or-ref-data-members, -cppcoreguidelines-avoid-non-const-global-variables, @@ -36,4 +37,7 @@ Checks: > -performance-no-int-to-ptr, -readability-function-cognitive-complexity, -readability-implicit-bool-conversion, +CheckOptions: + - key: cppcoreguidelines-avoid-do-while.IgnoreMacros + value: true InheritParentConfig: true diff --git a/examples/cube_view.h b/examples/cube_view.h index 647134c..399f625 100644 --- a/examples/cube_view.h +++ b/examples/cube_view.h @@ -4,7 +4,7 @@ #ifndef EXAMPLES_CUBE_VIEW_H #define EXAMPLES_CUBE_VIEW_H -#define GL_SILENCE_DEPRECATION 1 +#define GL_SILENCE_DEPRECATION 1 // NOLINT(modernize-macro-to-enum) #include "demo_utils.h" diff --git a/examples/sybok.hpp b/examples/sybok.hpp index 4fe4886..49abdf0 100644 --- a/examples/sybok.hpp +++ b/examples/sybok.hpp @@ -1530,7 +1530,7 @@ public: { VkBool32 s = {}; - if (VkResult r = vkGetPhysicalDeviceSurfaceSupportKHR( + if (const VkResult r = vkGetPhysicalDeviceSurfaceSupportKHR( physicalDevice, queueFamilyIndex, surface, &s)) { return r; } @@ -2015,8 +2015,8 @@ public: VkResult end() noexcept { if (_commandBuffer) { - VkResult r = _api.vkEndCommandBuffer(_commandBuffer); - _commandBuffer = {}; + const VkResult r = _api.vkEndCommandBuffer(_commandBuffer); + _commandBuffer = {}; return r; } diff --git a/test/.clang-tidy b/test/.clang-tidy index f8a23aa..8ecb90f 100644 --- a/test/.clang-tidy +++ b/test/.clang-tidy @@ -1,9 +1,10 @@ -# Copyright 2020-2022 David Robillard +# Copyright 2020-2023 David Robillard # SPDX-License-Identifier: 0BSD OR ISC Checks: > -bugprone-suspicious-include, -cert-err33-c, + -cert-err34-c, -google-runtime-references, -hicpp-multiway-paths-covered, -hicpp-signed-bitwise, -- cgit v1.2.1