aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorheretic <heretic@yandex-team.com>2022-08-10 19:10:04 +0300
committerheretic <heretic@yandex-team.com>2022-08-10 19:10:04 +0300
commita048de3d884f82f3f855c5023779f6c10cf4345f (patch)
tree959d20e79956cb1f2369750984f9f2db93d88877
parenta8325b381020e1a7d88f813b77b433727d7bf29b (diff)
downloadydb-a048de3d884f82f3f855c5023779f6c10cf4345f.tar.gz
Prepare to clang14: fix ydb part 1 -Wunused-but-set-variable
fix ydb -Wunused-but-set-variable fix ydb/library/yql/udfs/common/clickhouse/client -Wunused-but-set-variable fix ydb/core/erasure -Wunused-but-set-variable
-rw-r--r--ydb/core/blobstorage/dsproxy/dsproxy_patch.cpp4
-rw-r--r--ydb/core/blobstorage/dsproxy/dsproxy_range.cpp4
-rw-r--r--ydb/core/blobstorage/pdisk/blobstorage_pdisk_impl.cpp4
-rw-r--r--ydb/core/erasure/erasure_perf_test.cpp5
-rw-r--r--ydb/core/http_proxy/auth_factory.cpp4
-rw-r--r--ydb/core/tx/schemeshard/schemeshard__operation_common.h4
-rw-r--r--ydb/library/yql/core/type_ann/type_ann_core.cpp8
-rw-r--r--ydb/library/yql/core/type_ann/type_ann_pg.cpp4
-rw-r--r--ydb/library/yql/providers/clickhouse/actors/yql_ch_read_actor.cpp4
-rw-r--r--ydb/library/yql/sql/v1/sql.cpp6
-rw-r--r--ydb/library/yql/udfs/common/clickhouse/client/src/AggregateFunctions/AggregateFunctionFactory.cpp4
11 files changed, 27 insertions, 24 deletions
diff --git a/ydb/core/blobstorage/dsproxy/dsproxy_patch.cpp b/ydb/core/blobstorage/dsproxy/dsproxy_patch.cpp
index d0c5842904..8bdd1d8bc5 100644
--- a/ydb/core/blobstorage/dsproxy/dsproxy_patch.cpp
+++ b/ydb/core/blobstorage/dsproxy/dsproxy_patch.cpp
@@ -423,7 +423,7 @@ public:
for (const TPartPlacement &partPlacement : placement) {
ui32 idxInSubgroup = partPlacement.VDiskIdxInSubgroup;
- ui32 patchedPartId = partPlacement.PartId;
+ // ui32 patchedPartId = partPlacement.PartId;
Y_VERIFY_S(idxInSubgroup < VDisks.size(), "vdisidxInSubgroupkIdx# " << idxInSubgroup << "/" << VDisks.size());
Y_VERIFY(Info->GetIdxInSubgroup(VDisks[idxInSubgroup], OriginalId.Hash()) == idxInSubgroup);
@@ -431,7 +431,7 @@ public:
if (patchedIdxInSubgroup != idxInSubgroup) {
// now only mirror3dc has this case (has 9 vdisks instead of 4 or 8)
Y_VERIFY(Info->Type.GetErasure() == TErasureType::ErasureMirror3dc);
- patchedPartId = 1 + patchedIdxInSubgroup / 3;;
+ // patchedPartId = 1 + patchedIdxInSubgroup / 3;;
}
ReceivedResponseFlags[idxInSubgroup] = false;
diff --git a/ydb/core/blobstorage/dsproxy/dsproxy_range.cpp b/ydb/core/blobstorage/dsproxy/dsproxy_range.cpp
index a0e20065d1..c329dbf4f8 100644
--- a/ydb/core/blobstorage/dsproxy/dsproxy_range.cpp
+++ b/ydb/core/blobstorage/dsproxy/dsproxy_range.cpp
@@ -45,10 +45,10 @@ class TBlobStorageGroupRangeRequest : public TBlobStorageGroupRequestActor<TBlob
template<typename TPtr>
void SendReply(TPtr& reply) {
- ui32 size = 0;
+ /*ui32 size = 0;
for (const TEvBlobStorage::TEvRangeResult::TResponse& resp : reply->Responses) {
size += resp.Buffer.size();
- }
+ }*/
Mon->CountRangeResponseTime(TActivationContext::Now() - StartTime);
SendResponseAndDie(std::move(reply));
}
diff --git a/ydb/core/blobstorage/pdisk/blobstorage_pdisk_impl.cpp b/ydb/core/blobstorage/pdisk/blobstorage_pdisk_impl.cpp
index 881e798975..fd89730e8e 100644
--- a/ydb/core/blobstorage/pdisk/blobstorage_pdisk_impl.cpp
+++ b/ydb/core/blobstorage/pdisk/blobstorage_pdisk_impl.cpp
@@ -2950,7 +2950,7 @@ void TPDisk::EnqueueAll() {
void TPDisk::Update() {
Mon.UpdateDurationTracker.UpdateStarted();
- ui32 userSectorSize = 0;
+ // ui32 userSectorSize = 0;
// Make input queue empty
{
@@ -2958,7 +2958,7 @@ void TPDisk::Update() {
ForsetiMaxLogBatchNsCached = ForsetiMaxLogBatchNs;
ForsetiOpPieceSizeCached = PDiskCategory.IsSolidState() ? ForsetiOpPieceSizeSsd : ForsetiOpPieceSizeRot;
EnqueueAll();
- userSectorSize = Format.SectorPayloadSize();
+ /*userSectorSize = */Format.SectorPayloadSize();
// Switch the scheduler when possible
ForsetiScheduler.SetIsBinLogEnabled(EnableForsetiBinLog);
diff --git a/ydb/core/erasure/erasure_perf_test.cpp b/ydb/core/erasure/erasure_perf_test.cpp
index 2aaee89334..37b1a3bab6 100644
--- a/ydb/core/erasure/erasure_perf_test.cpp
+++ b/ydb/core/erasure/erasure_perf_test.cpp
@@ -235,7 +235,9 @@ void RopeMeasureSplitTime(TErasureType &type, ui64 dataSize, const TString& buff
THPTimer timer;
const size_t attempts = dataSize < 10000 ? ATTEMPTS : 10;
+#ifdef LONG_TEST
double time = 0;
+#endif
for (ui64 i = 0; i < attempts; ++i) {
ui64 begin = randGen.GenRand() % (buffer.size() - dataSize);
TString rope = TString(buffer.data() + begin, buffer.data() + begin + dataSize);
@@ -251,8 +253,9 @@ void RopeMeasureSplitTime(TErasureType &type, ui64 dataSize, const TString& buff
ropes[i] = RopeFromStringReference(std::move(partSet.Parts[i].OwnedString));
}
}
-
+#ifdef LONG_TEST
time += timer.PassedReset();
+#endif
}
diff --git a/ydb/core/http_proxy/auth_factory.cpp b/ydb/core/http_proxy/auth_factory.cpp
index 03f315cad3..2a41745c62 100644
--- a/ydb/core/http_proxy/auth_factory.cpp
+++ b/ydb/core/http_proxy/auth_factory.cpp
@@ -18,9 +18,9 @@ void TAuthFactory::Initialize(
ui32 grpcPort = 0;
TString CA;
grpcPort = grpcConfig.GetPort();
- bool secure = false;
+ // bool secure = false;
if (!grpcPort) {
- secure = true;
+ // secure = true;
grpcPort = grpcConfig.GetSslPort();
}
CA = grpcConfig.GetCA();
diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_common.h b/ydb/core/tx/schemeshard/schemeshard__operation_common.h
index ef3dbf84f6..f8b17ab93f 100644
--- a/ydb/core/tx/schemeshard/schemeshard__operation_common.h
+++ b/ydb/core/tx/schemeshard/schemeshard__operation_common.h
@@ -664,10 +664,10 @@ public:
auto it = context.SS->BlockStoreVolumes.FindPtr(targetPath->PathId);
Y_VERIFY(it, "Missing BlockStoreVolume while creating BlockStorePartition tablet");
auto volume = *it;
- const auto* volumeConfig = &volume->VolumeConfig;
+ /*const auto* volumeConfig = &volume->VolumeConfig;
if (volume->AlterData) {
volumeConfig = &volume->AlterData->VolumeConfig;
- }
+ }*/
}
THolder<TEvHive::TEvCreateTablet> ev = MakeHolder<TEvHive::TEvCreateTablet>(ui64(shardIdx.GetOwnerId()), ui64(shardIdx.GetLocalId()), shard.TabletType, shard.BindedChannels);
diff --git a/ydb/library/yql/core/type_ann/type_ann_core.cpp b/ydb/library/yql/core/type_ann/type_ann_core.cpp
index 80a77f5f82..de183250d6 100644
--- a/ydb/library/yql/core/type_ann/type_ann_core.cpp
+++ b/ydb/library/yql/core/type_ann/type_ann_core.cpp
@@ -2244,9 +2244,9 @@ namespace NTypeAnnImpl {
const bool isLeftNumeric = IsDataTypeNumeric(dataType[0]->GetSlot());
const bool isRightNumeric = IsDataTypeNumeric(dataType[1]->GetSlot());
- bool isOk = false;
+ // bool isOk = false;
if (isLeftNumeric && isRightNumeric) {
- isOk = true;
+ // isOk = true;
auto commonTypeSlot = GetNumericDataTypeByLevel(Max(GetNumericDataTypeLevel(dataType[0]->GetSlot()),
GetNumericDataTypeLevel(dataType[1]->GetSlot())));
commonType = ctx.Expr.MakeType<TDataExprType>(commonTypeSlot);
@@ -2315,9 +2315,9 @@ namespace NTypeAnnImpl {
const bool isLeftNumeric = IsDataTypeNumeric(dataType[0]->GetSlot());
const bool isRightNumeric = IsDataTypeNumeric(dataType[1]->GetSlot());
- bool isOk = false;
+ // bool isOk = false;
if (isLeftNumeric && isRightNumeric) {
- isOk = true;
+ // isOk = true;
auto commonTypeSlot = GetNumericDataTypeByLevel(Max(GetNumericDataTypeLevel(dataType[0]->GetSlot()),
GetNumericDataTypeLevel(dataType[1]->GetSlot())));
commonType = ctx.Expr.MakeType<TDataExprType>(commonTypeSlot);
diff --git a/ydb/library/yql/core/type_ann/type_ann_pg.cpp b/ydb/library/yql/core/type_ann/type_ann_pg.cpp
index 6d784adc09..2d510d01c0 100644
--- a/ydb/library/yql/core/type_ann/type_ann_pg.cpp
+++ b/ydb/library/yql/core/type_ann/type_ann_pg.cpp
@@ -3050,7 +3050,7 @@ IGraphTransformer::TStatus PgSelectWrapper(const TExprNode::TPtr& input, TExprNo
return IGraphTransformer::TStatus::Error;
}
- const TStructExprType* outputRowType = nullptr;
+ // const TStructExprType* outputRowType = nullptr;
TExprNode* setItems = nullptr;
TExprNode* setOps = nullptr;
bool hasSort = false;
@@ -3109,7 +3109,7 @@ IGraphTransformer::TStatus PgSelectWrapper(const TExprNode::TPtr& input, TExprNo
setItems = &option->Tail();
} else {
- outputRowType = option->Tail().Head().GetTypeAnn()->Cast<TListExprType>()->GetItemType()->
+ /*outputRowType = */option->Tail().Head().GetTypeAnn()->Cast<TListExprType>()->GetItemType()->
Cast<TStructExprType>();
}
} else if (optionName == "limit" || optionName == "offset") {
diff --git a/ydb/library/yql/providers/clickhouse/actors/yql_ch_read_actor.cpp b/ydb/library/yql/providers/clickhouse/actors/yql_ch_read_actor.cpp
index 43bf99778f..e69ca5593c 100644
--- a/ydb/library/yql/providers/clickhouse/actors/yql_ch_read_actor.cpp
+++ b/ydb/library/yql/providers/clickhouse/actors/yql_ch_read_actor.cpp
@@ -91,11 +91,11 @@ private:
}
}
- i64 GetAsyncInputData(NKikimr::NMiniKQL::TUnboxedValueVector& buffer, bool& finished, i64 freeSpace) final {
+ i64 GetAsyncInputData(NKikimr::NMiniKQL::TUnboxedValueVector& buffer, bool& finished, i64 /*freeSpace*/) final {
if (Result) {
const auto size = Result->size();
buffer.emplace_back(NKikimr::NMiniKQL::MakeString(std::string_view(*Result)));
- freeSpace -= size;
+ // freeSpace -= size;
finished = true;
Result.reset();
return size;
diff --git a/ydb/library/yql/sql/v1/sql.cpp b/ydb/library/yql/sql/v1/sql.cpp
index f23d57f6b3..6c287048e0 100644
--- a/ydb/library/yql/sql/v1/sql.cpp
+++ b/ydb/library/yql/sql/v1/sql.cpp
@@ -4327,7 +4327,7 @@ TNodePtr TSqlExpression::UnaryCasualExpr(const TUnaryCasualExprRule& node, const
Y_FAIL("You should change implementation according to grammar changes");
}
- bool onlyDots = true;
+ // bool onlyDots = true;
bool isColumnRef = !expr;
bool isFirstElem = true;
@@ -4335,7 +4335,7 @@ TNodePtr TSqlExpression::UnaryCasualExpr(const TUnaryCasualExprRule& node, const
switch (b.Alt_case()) {
case TRule_unary_subexpr_suffix::TBlock1::kAlt1: {
// key_expr
- onlyDots = false;
+ // onlyDots = false;
break;
}
case TRule_unary_subexpr_suffix::TBlock1::kAlt2: {
@@ -4344,7 +4344,7 @@ TNodePtr TSqlExpression::UnaryCasualExpr(const TUnaryCasualExprRule& node, const
isColumnRef = false;
}
- onlyDots = false;
+ // onlyDots = false;
break;
}
case TRule_unary_subexpr_suffix::TBlock1::kAlt3: {
diff --git a/ydb/library/yql/udfs/common/clickhouse/client/src/AggregateFunctions/AggregateFunctionFactory.cpp b/ydb/library/yql/udfs/common/clickhouse/client/src/AggregateFunctions/AggregateFunctionFactory.cpp
index b737e87250..9ad8a6cfbc 100644
--- a/ydb/library/yql/udfs/common/clickhouse/client/src/AggregateFunctions/AggregateFunctionFactory.cpp
+++ b/ydb/library/yql/udfs/common/clickhouse/client/src/AggregateFunctions/AggregateFunctionFactory.cpp
@@ -118,7 +118,7 @@ AggregateFunctionPtr AggregateFunctionFactory::getImpl(
bool has_null_arguments) const
{
String name = getAliasToOrName(name_param);
- bool is_case_insensitive = false;
+ // bool is_case_insensitive = false;
Value found;
/// Find by exact match.
@@ -130,7 +130,7 @@ AggregateFunctionPtr AggregateFunctionFactory::getImpl(
if (auto jt = case_insensitive_aggregate_functions.find(Poco::toLower(name)); jt != case_insensitive_aggregate_functions.end())
{
found = jt->second;
- is_case_insensitive = true;
+ // is_case_insensitive = true;
}
/*
ContextPtr query_context;