diff options
author | dimastark <dimastark@yandex-team.com> | 2022-12-29 16:53:41 +0300 |
---|---|---|
committer | dimastark <dimastark@yandex-team.com> | 2022-12-29 16:53:41 +0300 |
commit | f81b72552a40c350730a105225b27125d0dc5118 (patch) | |
tree | fcdc9ee14e50214276493327123a42c7b58c73d9 | |
parent | 9b70103609b66a27412572703418467b392f389a (diff) | |
download | ydb-f81b72552a40c350730a105225b27125d0dc5118.tar.gz |
fix ydb -Wunused-but-set-variable
-rw-r--r-- | ydb/core/blobstorage/vdisk/hulldb/test/testhull_index.cpp | 2 | ||||
-rw-r--r-- | ydb/core/erasure/erasure_rope_ut.cpp | 4 | ||||
-rw-r--r-- | ydb/core/erasure/erasure_ut.cpp | 4 | ||||
-rw-r--r-- | ydb/core/kqp/opt/kqp_query_plan.cpp | 14 | ||||
-rw-r--r-- | ydb/core/kqp/runtime/kqp_read_actor.cpp | 5 | ||||
-rw-r--r-- | ydb/public/sdk/cpp/examples/secondary_index/secondary_index_list.cpp | 2 |
6 files changed, 6 insertions, 25 deletions
diff --git a/ydb/core/blobstorage/vdisk/hulldb/test/testhull_index.cpp b/ydb/core/blobstorage/vdisk/hulldb/test/testhull_index.cpp index 4a8cf90c2f7..c358ed23a96 100644 --- a/ydb/core/blobstorage/vdisk/hulldb/test/testhull_index.cpp +++ b/ydb/core/blobstorage/vdisk/hulldb/test/testhull_index.cpp @@ -76,7 +76,6 @@ namespace NTest { // generate ordered level of LogoBlobs TVector<TLogoBlobSstPtr> GenerateOrderedLogoBlobsSsts(const TLogoBlobsPolicy &policy) { ui64 logoBlobsTotalBytes = 0; - ui64 barriersTotalBytes = 0; const ui64 logoBlobsRequiredBytes = policy.SstsNum * ChunkSize; // accumulate generated commands in LogoBlobs and Barriers buffers @@ -88,7 +87,6 @@ namespace NTest { } if (cmd.BarriersCmd) { Barriers.push_back(*cmd.BarriersCmd); - barriersTotalBytes += BarrierRecSizeof; } } diff --git a/ydb/core/erasure/erasure_rope_ut.cpp b/ydb/core/erasure/erasure_rope_ut.cpp index 62a6242ea92..f45c3392e71 100644 --- a/ydb/core/erasure/erasure_rope_ut.cpp +++ b/ydb/core/erasure/erasure_rope_ut.cpp @@ -82,10 +82,6 @@ void TestAllLossesDifferentSizes(TRopeErasureType &groupType, ui32 maxParts, //printf("k=%u, n=%u, variants=%u\n", missingParts, maxParts, maxMissingVariants); for (ui32 missingVariant = 0; missingVariant < maxMissingVariants; ++missingVariant) { VERBOSE_COUT(PrintArr(missingPartIdx, missingParts)); - ui32 partMask = ~(ui32)0; - for (ui32 i = 0; i < missingParts; ++i) { - partMask &= ~(ui32)(1ul << missingPartIdx[i]); - } for (ui32 dataSize = 1; dataSize < 600; ++dataSize) { VERBOSE_COUT("dataSize# " << dataSize << Endl); for (ui32 type = 0; type < 3; ++type) { diff --git a/ydb/core/erasure/erasure_ut.cpp b/ydb/core/erasure/erasure_ut.cpp index ec45ed7d279..3029d8387a8 100644 --- a/ydb/core/erasure/erasure_ut.cpp +++ b/ydb/core/erasure/erasure_ut.cpp @@ -85,10 +85,6 @@ void TestAllLossesDifferentSizes(TErasureType &groupType, ui32 maxParts) { //printf("k=%u, n=%u, variants=%u\n", missingParts, maxParts, maxMissingVariants); for (ui32 missingVariant = 0; missingVariant < maxMissingVariants; ++missingVariant) { VERBOSE_COUT(PrintArr(missingPartIdx, missingParts)); - ui32 partMask = ~(ui32)0; - for (ui32 i = 0; i < missingParts; ++i) { - partMask &= ~(ui32)(1ul << missingPartIdx[i]); - } for (ui32 dataSize = 1; dataSize < 600; ++dataSize) { VERBOSE_COUT("dataSize# " << dataSize << Endl); for (ui32 type = 0; type < 3; ++type) { diff --git a/ydb/core/kqp/opt/kqp_query_plan.cpp b/ydb/core/kqp/opt/kqp_query_plan.cpp index 46263d68e30..30562146485 100644 --- a/ydb/core/kqp/opt/kqp_query_plan.cpp +++ b/ydb/core/kqp/opt/kqp_query_plan.cpp @@ -702,19 +702,18 @@ private: SerializerCtx.Tables[table].Reads.push_back(readInfo); - ui32 operatorId; if (readInfo.Type == EPlanTableReadType::Scan) { op.Properties["Name"] = "TableRangeScan"; - operatorId = AddOperator(planNode, "TableRangeScan", std::move(op)); + AddOperator(planNode, "TableRangeScan", std::move(op)); } else if (readInfo.Type == EPlanTableReadType::FullScan) { op.Properties["Name"] = "TableFullScan"; - operatorId = AddOperator(planNode, "TableFullScan", std::move(op)); + AddOperator(planNode, "TableFullScan", std::move(op)); } else if (readInfo.Type == EPlanTableReadType::Lookup) { op.Properties["Name"] = "TablePointLookup"; - operatorId = AddOperator(planNode, "TablePointLookup", std::move(op)); + AddOperator(planNode, "TablePointLookup", std::move(op)); } else { op.Properties["Name"] = "TableScan"; - operatorId = AddOperator(planNode, "TableScan", std::move(op)); + AddOperator(planNode, "TableScan", std::move(op)); } } else { const auto table = TString(sourceSettings.Table().Path()); @@ -808,13 +807,12 @@ private: op.Properties["Reverse"] = true; } - ui32 operatorId; if (readInfo.Type == EPlanTableReadType::FullScan) { op.Properties["Name"] = "TableFullScan"; - operatorId = AddOperator(planNode, "TableFullScan", std::move(op)); + AddOperator(planNode, "TableFullScan", std::move(op)); } else { op.Properties["Name"] = "TableRangesScan"; - operatorId = AddOperator(planNode, "TableRangesScan", std::move(op)); + AddOperator(planNode, "TableRangesScan", std::move(op)); } SerializerCtx.Tables[table].Reads.push_back(std::move(readInfo)); diff --git a/ydb/core/kqp/runtime/kqp_read_actor.cpp b/ydb/core/kqp/runtime/kqp_read_actor.cpp index 0fb4018eb90..482409e3fb4 100644 --- a/ydb/core/kqp/runtime/kqp_read_actor.cpp +++ b/ydb/core/kqp/runtime/kqp_read_actor.cpp @@ -358,7 +358,6 @@ public: CA_LOG_E("Resolve request failed for table '" << Settings.GetTable().GetTablePath() << "', ErrorCount# " << request->ErrorCount); auto statusCode = NDqProto::StatusIds::UNAVAILABLE; - auto issueCode = TIssuesIds::KIKIMR_TEMPORARILY_UNAVAILABLE; TString error; for (const auto& x : request->ResultSet) { @@ -369,22 +368,18 @@ public: switch (x.Status) { case NSchemeCache::TSchemeCacheRequest::EStatus::PathErrorNotExist: statusCode = NDqProto::StatusIds::SCHEME_ERROR; - issueCode = TIssuesIds::KIKIMR_SCHEME_MISMATCH; error = TStringBuilder() << "Table '" << Settings.GetTable().GetTablePath() << "' not exists."; break; case NSchemeCache::TSchemeCacheRequest::EStatus::TypeCheckError: statusCode = NDqProto::StatusIds::SCHEME_ERROR; - issueCode = TIssuesIds::KIKIMR_SCHEME_MISMATCH; error = TStringBuilder() << "Table '" << Settings.GetTable().GetTablePath() << "' scheme changed."; break; case NSchemeCache::TSchemeCacheRequest::EStatus::LookupError: statusCode = NDqProto::StatusIds::UNAVAILABLE; - issueCode = TIssuesIds::KIKIMR_TEMPORARILY_UNAVAILABLE; error = TStringBuilder() << "Failed to resolve table '" << Settings.GetTable().GetTablePath() << "'."; break; default: statusCode = NDqProto::StatusIds::SCHEME_ERROR; - issueCode = TIssuesIds::KIKIMR_SCHEME_MISMATCH; error = TStringBuilder() << "Unresolved table '" << Settings.GetTable().GetTablePath() << "'. Status: " << x.Status; break; } diff --git a/ydb/public/sdk/cpp/examples/secondary_index/secondary_index_list.cpp b/ydb/public/sdk/cpp/examples/secondary_index/secondary_index_list.cpp index b761669a226..d06194a38b6 100644 --- a/ydb/public/sdk/cpp/examples/secondary_index/secondary_index_list.cpp +++ b/ydb/public/sdk/cpp/examples/secondary_index/secondary_index_list.cpp @@ -291,12 +291,10 @@ int RunListSeries(TDriver& driver, const TString& prefix, int argc, char** argv) columns[4].push_back(TStringBuilder() << result.Views); } size_t widths[5] = { 0 }; - size_t total_width = 6; for (size_t i = 0; i < 5; ++i) { for (const auto& value : columns[i]) { widths[i] = Max(widths[i], GetNumberOfUTF8Chars(value) + 2); } - total_width += widths[i]; } auto printLine = [&]() { Cout << '+'; |