diff options
author | Roman Stratiienko <r.stratiienko@gmail.com> | 2021-02-15 13:44:19 +0200 |
---|---|---|
committer | Roman Stratiienko <r.stratiienko@gmail.com> | 2021-03-03 16:12:22 +0200 |
commit | b3b5c1e937d6bbbd44b65f5c36305bdc8fbb3246 (patch) | |
tree | 5049e1aa7f8ab0918d3c84e6150ad3555618d4eb /backend | |
parent | 6a10c4ce1f5601051c44b0f0cd85b1059e0a1bba (diff) | |
download | drm_hwcomposer-b3b5c1e937d6bbbd44b65f5c36305bdc8fbb3246.tar.gz |
drm_hwcomposer: clang-tidy: enable cppcoreguidelines-* checks
Our code isn't ready for the following checks therefore keep disabled
-cppcoreguidelines-pro-bounds-array-to-pointer-decay
-cppcoreguidelines-pro-bounds-constant-array-index
-cppcoreguidelines-pro-bounds-pointer-arithmetic
-cppcoreguidelines-pro-type-cstyle-cast
-cppcoreguidelines-pro-type-vararg
-cppcoreguidelines-avoid-magic-numbers
-cppcoreguidelines-macro-usage
-cppcoreguidelines-avoid-c-arrays
+ fixed existing tidy warnings for these checks.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Diffstat (limited to 'backend')
-rw-r--r-- | backend/Backend.cpp | 3 | ||||
-rw-r--r-- | backend/BackendClient.cpp | 1 | ||||
-rw-r--r-- | backend/BackendRCarDu.cpp | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/backend/Backend.cpp b/backend/Backend.cpp index 15a9ff1..16e2859 100644 --- a/backend/Backend.cpp +++ b/backend/Backend.cpp @@ -63,7 +63,7 @@ HWC2::Error Backend::ValidateDisplay(DrmHwcTwo::HwcDisplay *display, size_t extra_client = (z_map.size() - client_size) - avail_planes; if (extra_client > 0) { int start = 0; - size_t steps; + size_t steps = 0; if (client_size != 0) { size_t prepend = std::min((size_t)client_start, extra_client); size_t append = std::min(z_map.size() - (client_start + client_size), @@ -136,6 +136,7 @@ bool Backend::IsClientLayer(DrmHwcTwo::HwcDisplay *display, display->resource_manager()->ForcedScalingWithGpu()); } +// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables) REGISTER_BACKEND("generic", Backend); } // namespace android diff --git a/backend/BackendClient.cpp b/backend/BackendClient.cpp index 033a35c..bef536a 100644 --- a/backend/BackendClient.cpp +++ b/backend/BackendClient.cpp @@ -30,6 +30,7 @@ HWC2::Error BackendClient::ValidateDisplay(DrmHwcTwo::HwcDisplay *display, return HWC2::Error::HasChanges; } +// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables) REGISTER_BACKEND("client", BackendClient); } // namespace android diff --git a/backend/BackendRCarDu.cpp b/backend/BackendRCarDu.cpp index e85fa71..6585406 100644 --- a/backend/BackendRCarDu.cpp +++ b/backend/BackendRCarDu.cpp @@ -40,6 +40,7 @@ bool BackendRCarDu::IsClientLayer(DrmHwcTwo::HwcDisplay *display, return Backend::IsClientLayer(display, layer); } +// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables) REGISTER_BACKEND("rcar-du", BackendRCarDu); } // namespace android
\ No newline at end of file |