summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbabenko <[email protected]>2025-04-14 20:12:08 +0300
committerbabenko <[email protected]>2025-04-14 20:55:33 +0300
commitcf4e6551ac1ad9a5dc8d092c5c5e6d63315f3fac (patch)
treea2f2ffe9f5c7d131848b2129cfb02c3575f2b944
parentb147484e3469f7dd312ffbc18997c2cc3fae5be4 (diff)
Enable more parentheses-related warnings
commit_hash:e5aee6f170c4d38261597cd10e9b42c2dc58c1f3
-rw-r--r--library/cpp/yt/ya_cpp.make.inc12
-rw-r--r--yt/yt/core/concurrency/fiber_scheduler_thread.cpp3
-rw-r--r--yt/yt/core/http/compression.cpp6
3 files changed, 16 insertions, 5 deletions
diff --git a/library/cpp/yt/ya_cpp.make.inc b/library/cpp/yt/ya_cpp.make.inc
index 81c522e0d61..59dfb6e1c0d 100644
--- a/library/cpp/yt/ya_cpp.make.inc
+++ b/library/cpp/yt/ya_cpp.make.inc
@@ -1,8 +1,18 @@
# This file should be included in all YT projects (including YT ORM installations).
-IF (NOT MSVC)
+IF (CLANG)
CXXFLAGS(
-Wdeprecated-this-capture
-Wimplicit-fallthrough
+ -Wparentheses
+ -Wno-logical-op-parentheses
+ -Wno-bitwise-op-parentheses
)
+
+ IF (MUSL)
+ CXXFLAGS(
+ --system-header-prefix=endian.h
+ --system-header-prefix=byteswap.h
+ )
+ ENDIF()
ENDIF()
diff --git a/yt/yt/core/concurrency/fiber_scheduler_thread.cpp b/yt/yt/core/concurrency/fiber_scheduler_thread.cpp
index 073e8d40078..cd85ca23c8c 100644
--- a/yt/yt/core/concurrency/fiber_scheduler_thread.cpp
+++ b/yt/yt/core/concurrency/fiber_scheduler_thread.cpp
@@ -509,7 +509,6 @@ void FiberTrampoline()
YT_LOG_DEBUG("Fiber started");
auto* currentFiber = GetCurrentFiber();
- TFiber* successorFiber = nullptr;
// Break loop to terminate fiber
while (auto* fiberThread = TryGetFiberThread()) {
@@ -532,7 +531,7 @@ void FiberTrampoline()
// Trace context can be restored for resumer fiber, so current trace context and memory tag are
// not necessarily null. Check them after switch from and returning into current fiber.
- if (successorFiber = ExtractResumerFiber()) {
+ if (auto* successorFiber = ExtractResumerFiber()) {
// Suspend current fiber.
TIdleFiberPool::Get()->SwichFromFiberAndMakeItIdle(currentFiber, successorFiber);
}
diff --git a/yt/yt/core/http/compression.cpp b/yt/yt/core/http/compression.cpp
index 17e7a24872e..4f7bf499e25 100644
--- a/yt/yt/core/http/compression.cpp
+++ b/yt/yt/core/http/compression.cpp
@@ -143,7 +143,8 @@ private:
return;
}
- if (Compressor_ = TryDetectOptionalCompressors(ContentEncoding_, this)) {
+ Compressor_ = TryDetectOptionalCompressors(ContentEncoding_, this);
+ if (Compressor_) {
return;
}
@@ -261,7 +262,8 @@ private:
return;
}
- if (Decompressor_ = TryDetectOptionalDecompressors(ContentEncoding_, this)) {
+ Decompressor_ = TryDetectOptionalDecompressors(ContentEncoding_, this);
+ if (Decompressor_) {
return;
}