diff options
author | Roman Stratiienko <roman.o.stratiienko@globallogic.com> | 2022-04-28 15:42:36 +0300 |
---|---|---|
committer | Roman Stratiienko <roman.o.stratiienko@globallogic.com> | 2022-05-09 18:19:45 +0300 |
commit | cf80b9b1586c7344c1b9955a4c1a83028efb89e3 (patch) | |
tree | 3e1e30c181fa849f09e96b55922c842700d3a480 | |
parent | f87d808e2939a8e5cd1d0d5c580ed4de4e9a6f2a (diff) | |
download | drm_hwcomposer-cf80b9b1586c7344c1b9955a4c1a83028efb89e3.tar.gz |
drm_hwcomposer: CI: Bump clang toolchain version to v14
Additionally:
1. Fix new clang-tidy findings
2. Disable readability-identifier-length check for all tidy levels
Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
-rwxr-xr-x | .ci/.gitlab-ci-checkcommit.sh | 2 | ||||
-rw-r--r-- | .ci/Makefile | 5 | ||||
-rw-r--r-- | .gitlab-ci.yml | 4 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | drm/DrmFbImporter.cpp | 4 | ||||
-rw-r--r-- | utils/Worker.h | 3 |
6 files changed, 11 insertions, 9 deletions
diff --git a/.ci/.gitlab-ci-checkcommit.sh b/.ci/.gitlab-ci-checkcommit.sh index c9c2e49..c6f7c4e 100755 --- a/.ci/.gitlab-ci-checkcommit.sh +++ b/.ci/.gitlab-ci-checkcommit.sh @@ -50,7 +50,7 @@ git log --pretty='%h' FETCH_HEAD..HEAD | while read h; do exit 1 fi - git show "$h" -- | clang-format-diff-13 -p 1 -style=file > /tmp/format-fixup.patch + git show "$h" -- | clang-format-diff-14 -p 1 -style=file > /tmp/format-fixup.patch if [ -s /tmp/format-fixup.patch ]; then cat /tmp/format-fixup.patch >&2 exit 1 diff --git a/.ci/Makefile b/.ci/Makefile index a0e4b73..581c6d9 100644 --- a/.ci/Makefile +++ b/.ci/Makefile @@ -2,8 +2,8 @@ INCLUDE_DIRS := . ../libdrm/include/drm include ./.ci/android_headers ./tests/test_include SYSTEM_INCLUDE_DIRS := /usr/include/libdrm -CLANG := clang++-13 -CLANG_TIDY := clang-tidy-13 +CLANG := clang++-14 +CLANG_TIDY := clang-tidy-14 OUT_DIR := /tmp/drm_hwcomposer/build SRC_DIR := . @@ -43,6 +43,7 @@ TIDY_CHECKS_FINE := * \ -cppcoreguidelines-pro-type-vararg \ -hicpp-vararg \ -hicpp-signed-bitwise \ + -readability-identifier-length \ TIDY_CHECKS_NORMAL := \ $(TIDY_CHECKS_FINE) \ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 89ac1b8..eb0c265 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,11 +1,11 @@ -image: ubuntu:21.10 +image: ubuntu:22.04 variables: DEBIAN_FRONTEND: noninteractive before_script: - apt-get --quiet update --yes >/dev/null - - apt-get --quiet install --yes clang-13 clang-tidy-13 clang-format-13 git libdrm-dev blueprint-tools libgtest-dev make >/dev/null + - apt-get --quiet install --yes clang-14 clang-tidy-14 clang-format-14 git libdrm-dev blueprint-tools libgtest-dev make >/dev/null stages: - build @@ -16,7 +16,7 @@ A short list of contribution guidelines: you with formatting of your patches: ``` - git diff | clang-format-diff-13 -p 1 -style=file + git diff | clang-format-diff-14 -p 1 -style=file ``` * Hardware specific changes should be tested on relevant platforms before diff --git a/drm/DrmFbImporter.cpp b/drm/DrmFbImporter.cpp index eeab076..96a9609 100644 --- a/drm/DrmFbImporter.cpp +++ b/drm/DrmFbImporter.cpp @@ -69,11 +69,11 @@ auto DrmFbIdHandle::CreateInstance(hwc_drm_bo_t *bo, GemHandle first_gem_handle, /* Create framebuffer object */ if (!has_modifiers) { err = drmModeAddFB2(drm.GetFd(), bo->width, bo->height, bo->format, - &local->gem_handles_[0], &bo->pitches[0], + local->gem_handles_.data(), &bo->pitches[0], &bo->offsets[0], &local->fb_id_, 0); } else { err = drmModeAddFB2WithModifiers(drm.GetFd(), bo->width, bo->height, - bo->format, &local->gem_handles_[0], + bo->format, local->gem_handles_.data(), &bo->pitches[0], &bo->offsets[0], &bo->modifiers[0], &local->fb_id_, DRM_MODE_FB_MODIFIERS); diff --git a/utils/Worker.h b/utils/Worker.h index ab01d5f..74cfdc4 100644 --- a/utils/Worker.h +++ b/utils/Worker.h @@ -44,9 +44,10 @@ class Worker { return initialized_; } + virtual ~Worker(); + protected: Worker(const char *name, int priority); - virtual ~Worker(); int InitWorker(); virtual void Routine() = 0; |