From 1ff04e8ebf08c36e0c29ec2e936add0917acdc1b Mon Sep 17 00:00:00 2001
From: Florian Schmaus <flow@cs.fau.de>
Date: Wed, 12 May 2021 19:38:28 +0200
Subject: [PATCH] [gitlab-ci] Bump debian-testing-dev image to 1.10

---
 .clang-tidy              | 1 +
 .gitlab-ci.yml           | 2 +-
 apps/fsearch/fsearch.cpp | 4 ++--
 emper/Context.hpp        | 3 ++-
 emper/io/IoContext.cpp   | 2 +-
 emper/lib/DebugUtil.cpp  | 4 ++--
 6 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/.clang-tidy b/.clang-tidy
index 561eb876..b914e66b 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -9,6 +9,7 @@ Checks: >
   -cert-err58-cpp,
   -clang-diagnostic-empty-translation-unit,
   -readability-braces-around-statements,
+  -readability-function-cognitive-complexity,
   -readability-implicit-bool-conversion,
   -readability-isolate-declaration,
   -readability-magic-numbers,
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 566199a5..081acca5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,4 +1,4 @@
-image: "flowdalic/debian-testing-dev:1.8"
+image: "flowdalic/debian-testing-dev:1.10"
 
 before_script:
   - |
diff --git a/apps/fsearch/fsearch.cpp b/apps/fsearch/fsearch.cpp
index 238d26ec..09f479d1 100644
--- a/apps/fsearch/fsearch.cpp
+++ b/apps/fsearch/fsearch.cpp
@@ -32,7 +32,7 @@ void search(const std::string& path) {
 	}
 
 	std::array<char, EMPER_RIPGREP_BUFSIZE> buf;
-	size_t bytes_searched = 0;
+	off_t bytes_searched = 0;
 
 	ssize_t bytes_read = emper::io::readFileAndWait(fd, buf.data(), buf.size(), bytes_searched);
 	while (bytes_read > 0) {
@@ -41,7 +41,7 @@ void search(const std::string& path) {
 			return;
 		}
 
-		bytes_searched += static_cast<size_t>(bytes_read);
+		bytes_searched += bytes_read;
 		bytes_read = emper::io::readFileAndWait(fd, buf.data(), buf.size(), -1);
 	}
 
diff --git a/emper/Context.hpp b/emper/Context.hpp
index 9f1a9436..b1f7db6d 100644
--- a/emper/Context.hpp
+++ b/emper/Context.hpp
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: LGPL-3.0-or-later
-// Copyright © 2020 Florian Schmaus
+// Copyright © 2020-2021 Florian Schmaus
 #pragma once
 
 #include <cassert>			// for assert
@@ -82,6 +82,7 @@ class ALIGN_TO_CACHE_LINE Context : Logger<LogSubsystem::C> {
 	// cppcheck-suppress noExplicitConstructor selfInitialization
 	Context(func_t mainFunction)
 			// Align the Top-of-Stack (tos) to 16 byte.
+			// NOLINTNEXTLINE(performance-no-int-to-ptr)
 			: tos((void*)((uintptr_t)(context + CONTEXT_SIZE) & (~0xf))),
 				mainFunction(std::move(std::move(mainFunction))) {
 		//		valgrindStackId = VALGRIND_STACK_REGISTER(context, context + CONTEXT_SI);
diff --git a/emper/io/IoContext.cpp b/emper/io/IoContext.cpp
index cc377625..bc5300f8 100644
--- a/emper/io/IoContext.cpp
+++ b/emper/io/IoContext.cpp
@@ -188,7 +188,7 @@ auto IoContext::reapCompletions(ContinuationBuffer &continuationFibers) -> unsig
 	unsigned reReapCount = 0;
 	uint32_t maxRaceFreeCompleterAttempts = 1;
 
-	using Completion = std::pair<uint32_t, void *>;
+	using Completion = std::pair<int32_t, void *>;
 	// vector to store seen cqes to make the critical section
 	// where cq_lock is held as small as possible
 	std::array<Completion, CQE_BATCH_COUNT> reapedCompletions;
diff --git a/emper/lib/DebugUtil.cpp b/emper/lib/DebugUtil.cpp
index 9b0d19e1..85bd93a3 100644
--- a/emper/lib/DebugUtil.cpp
+++ b/emper/lib/DebugUtil.cpp
@@ -1,5 +1,5 @@
 // SPDX-License-Identifier: LGPL-3.0-or-later
-// Copyright © 2020 Florian Schmaus
+// Copyright © 2020-2021 Florian Schmaus
 #include "DebugUtil.hpp"
 
 #include <execinfo.h>
@@ -14,7 +14,7 @@ static void handler(int sig) {
 	// NOLINTNEXTLINE(modernize-avoid-c-arrays)
 	void* array[backtrace_size];
 
-	size_t size = backtrace(array, backtrace_size);
+	int size = backtrace(array, backtrace_size);
 
 	fprintf(stderr, "Error: signal %d:\n", sig);
 	backtrace_symbols_fd(array, size, STDERR_FILENO);
-- 
GitLab