diff options
author | Ilya Dzenzelyuk <43926347+dzen03@users.noreply.github.com> | 2024-01-23 18:38:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-23 16:38:32 +0100 |
commit | 0d6bce5992d52eae016bbc562a52bac587ec1039 (patch) | |
tree | 6a669186f44064ecb4bf3df23505eea28331486c | |
parent | f7af2414e8e24b3765791b3fc1c2aa3801c9380f (diff) | |
download | ydb-0d6bce5992d52eae016bbc562a52bac587ec1039.tar.gz |
Fix set but unused varibles to fix -Wunused-but-set-variable (#1175)
* Fix set but unused varibles to enable -Wunused-but-set-variable in the future
* Remove one move variable
-rw-r--r-- | ydb/core/base/statestorage.cpp | 2 | ||||
-rw-r--r-- | ydb/core/blobstorage/dsproxy/dsproxy_discover.cpp | 2 | ||||
-rw-r--r-- | ydb/core/blobstorage/pdisk/blobstorage_pdisk_ut.cpp | 3 | ||||
-rw-r--r-- | ydb/core/blobstorage/vdisk/syncer/guid_recovery.cpp | 5 | ||||
-rw-r--r-- | ydb/core/client/minikql_compile/yql_expr_minikql.cpp | 2 | ||||
-rw-r--r-- | ydb/core/driver_lib/run/run.cpp | 2 | ||||
-rw-r--r-- | ydb/core/formats/arrow/arrow_batch_builder.cpp | 2 | ||||
-rw-r--r-- | ydb/core/kqp/runtime/kqp_sequencer_actor.cpp | 2 | ||||
-rw-r--r-- | ydb/core/kqp/ut/common/kqp_ut_common.cpp | 4 | ||||
-rw-r--r-- | ydb/core/mind/hive/monitoring.cpp | 7 | ||||
-rw-r--r-- | ydb/core/mind/local.cpp | 2 | ||||
-rw-r--r-- | ydb/core/testlib/tablet_helpers.cpp | 2 | ||||
-rw-r--r-- | ydb/core/tx/schemeshard/schemeshard__operation_drop_pq.cpp | 2 | ||||
-rw-r--r-- | ydb/core/ymq/http/parser.rl6 | 1 | ||||
-rw-r--r-- | ydb/library/yql/minikql/comp_nodes/mkql_grace_join.cpp | 2 | ||||
-rw-r--r-- | ydb/library/yql/minikql/comp_nodes/mkql_grace_join_imp.cpp | 5 | ||||
-rw-r--r-- | ydb/library/yql/providers/dq/task_runner_actor/task_runner_actor.cpp | 3 |
17 files changed, 1 insertions, 47 deletions
diff --git a/ydb/core/base/statestorage.cpp b/ydb/core/base/statestorage.cpp index e1a1707a86..e73cc923e4 100644 --- a/ydb/core/base/statestorage.cpp +++ b/ydb/core/base/statestorage.cpp @@ -136,7 +136,6 @@ ui32 TStateStorageInfo::ContentHash() const { void TStateStorageInfo::TSelection::MergeReply(EStatus status, EStatus *owner, ui64 targetCookie, bool resetOld) { ui32 unknown = 0; ui32 ok = 0; - ui32 noinfo = 0; ui32 outdated = 0; const ui32 majority = Sz / 2 + 1; @@ -160,7 +159,6 @@ void TStateStorageInfo::TSelection::MergeReply(EStatus status, EStatus *owner, u ++ok; break; case StatusNoInfo: - ++noinfo; break; case StatusOutdated: ++outdated; diff --git a/ydb/core/blobstorage/dsproxy/dsproxy_discover.cpp b/ydb/core/blobstorage/dsproxy/dsproxy_discover.cpp index 3c4cb72b1e..1dfeeeb87a 100644 --- a/ydb/core/blobstorage/dsproxy/dsproxy_discover.cpp +++ b/ydb/core/blobstorage/dsproxy/dsproxy_discover.cpp @@ -499,7 +499,6 @@ class TBlobStorageGroupDiscoverRequest : public TBlobStorageGroupRequestActor<TB // Feed more data when possible bool isAllRead = true; bool isAllDisksAbleToStep = true; - ui32 unableToStepDiskCount = 0; bool isFirst = true; TLogoBlobID stepToId; @@ -515,7 +514,6 @@ class TBlobStorageGroupDiscoverRequest : public TBlobStorageGroupRequestActor<TB } else { if (!curVDisk.IsError && curVDisk.IsMoreRequested) { isAllDisksAbleToStep = false; - ++unableToStepDiskCount; } } if (!curVDisk.IsError && !curVDisk.IsAllRead) { diff --git a/ydb/core/blobstorage/pdisk/blobstorage_pdisk_ut.cpp b/ydb/core/blobstorage/pdisk/blobstorage_pdisk_ut.cpp index 07440a926f..dd3587f71e 100644 --- a/ydb/core/blobstorage/pdisk/blobstorage_pdisk_ut.cpp +++ b/ydb/core/blobstorage/pdisk/blobstorage_pdisk_ut.cpp @@ -414,8 +414,6 @@ Y_UNIT_TEST_SUITE(TPDiskTest) { TVDiskMock vdisk(&testCtx); vdisk.InitFull(); - ui32 errors = 0; - vdisk.ReserveChunk(); vdisk.CommitReservedChunks(); UNIT_ASSERT(vdisk.Chunks[EChunkState::COMMITTED].size() == 1); @@ -435,7 +433,6 @@ Y_UNIT_TEST_SUITE(TPDiskTest) { const auto res = testCtx.Recv<NPDisk::TEvChunkReadResult>(); //Ctest << res->ToString() << Endl; if (res->Status != NKikimrProto::OK) { - ++errors; if (!printed) { printed = true; Ctest << res->ToString() << Endl; diff --git a/ydb/core/blobstorage/vdisk/syncer/guid_recovery.cpp b/ydb/core/blobstorage/vdisk/syncer/guid_recovery.cpp index 8aa0a0a1a2..a0d098f26d 100644 --- a/ydb/core/blobstorage/vdisk/syncer/guid_recovery.cpp +++ b/ydb/core/blobstorage/vdisk/syncer/guid_recovery.cpp @@ -396,14 +396,11 @@ namespace NKikimr { TQuorumTracker finalQuorum(Self, Top, true); // include my faildomain TMap<TVDiskEternalGuid, ui32> finalGuidMap; // Guid -> HowManyVDisksHasThisGuid TMap<TVDiskEternalGuid, ui32> inProgressGuidMap; // Guid -> HowManyVDisksHasThisGuid - ui32 emptyCounter = 0; - ui32 noAnswer = 0; for (const auto &x : Neighbors) { const auto &v = x.Get(); if (v.Obtained) { switch (v.State) { case TSyncVal::Empty: { - emptyCounter++; break; } case TSyncVal::InProgress: { @@ -417,8 +414,6 @@ namespace NKikimr { } default: Y_ABORT("Unexpected case"); } - } else { - noAnswer++; } } diff --git a/ydb/core/client/minikql_compile/yql_expr_minikql.cpp b/ydb/core/client/minikql_compile/yql_expr_minikql.cpp index ae555df863..7980b7322a 100644 --- a/ydb/core/client/minikql_compile/yql_expr_minikql.cpp +++ b/ydb/core/client/minikql_compile/yql_expr_minikql.cpp @@ -965,7 +965,6 @@ TIntrusivePtr<NCommon::IMkqlCallableCompiler> CreateMkqlCompiler(TContext::TPtr bool includeFrom = true; bool includeTo = true; auto rangeTuple = node.Child(1); - ui32 keyCount = 0; ui32 fromComponents = 0; ui32 toComponents = 0; for (auto rangeItem : rangeTuple->Children()) { @@ -989,7 +988,6 @@ TIntrusivePtr<NCommon::IMkqlCallableCompiler> CreateMkqlCompiler(TContext::TPtr continue; } - ++keyCount; if (!rangeItem->Child(1)->IsCallable("Void")) { ++fromComponents; } diff --git a/ydb/core/driver_lib/run/run.cpp b/ydb/core/driver_lib/run/run.cpp index 69ac30badc..6f087ff004 100644 --- a/ydb/core/driver_lib/run/run.cpp +++ b/ydb/core/driver_lib/run/run.cpp @@ -260,7 +260,6 @@ public: appData->ChannelProfiles->Profiles.emplace_back(); TChannelProfiles::TProfile &outProfile = appData->ChannelProfiles->Profiles.back(); - ui32 channelIdx = 0; for (const NKikimrConfig::TChannelProfileConfig::TProfile::TChannel &channel : profile.GetChannel()) { Y_ABORT_UNLESS(channel.HasErasureSpecies()); Y_ABORT_UNLESS(channel.HasPDiskCategory()); @@ -274,7 +273,6 @@ public: const TString kind = channel.GetStoragePoolKind(); outProfile.Channels.push_back(TChannelProfiles::TProfile::TChannel(erasure, pDiskCategory, vDiskCategory, kind)); - ++channelIdx; } } } diff --git a/ydb/core/formats/arrow/arrow_batch_builder.cpp b/ydb/core/formats/arrow/arrow_batch_builder.cpp index 43c79854c2..3e3fd04865 100644 --- a/ydb/core/formats/arrow/arrow_batch_builder.cpp +++ b/ydb/core/formats/arrow/arrow_batch_builder.cpp @@ -112,7 +112,6 @@ NKikimr::NArrow::TRecordBatchConstructor& TRecordBatchConstructor::AddRecordsBat } Y_ABORT_UNLESS((int)batchColumns.size() == Schema->num_fields()); Y_ABORT_UNLESS((int)Builders.size() == Schema->num_fields()); - ui32 cIdx = 0; std::vector<std::unique_ptr<arrow::ArrayBuilder>>::const_iterator currentBuilder = Builders.begin(); for (auto&& c : batchColumns) { if (!c) { @@ -131,7 +130,6 @@ NKikimr::NArrow::TRecordBatchConstructor& TRecordBatchConstructor::AddRecordsBat } } ++currentBuilder; - ++cIdx; } RecordsCount += value->num_rows(); return *this; diff --git a/ydb/core/kqp/runtime/kqp_sequencer_actor.cpp b/ydb/core/kqp/runtime/kqp_sequencer_actor.cpp index 3c0c9cc970..b9b6e7acc2 100644 --- a/ydb/core/kqp/runtime/kqp_sequencer_actor.cpp +++ b/ydb/core/kqp/runtime/kqp_sequencer_actor.cpp @@ -207,7 +207,6 @@ private: i64 ReplyResult(NKikimr::NMiniKQL::TUnboxedValueBatch& batch, i64 freeSpace) { auto guard = BindAllocator(); - size_t rowsInReply = 0; bool hasSequences = true; i64 totalSize = 0; @@ -219,7 +218,6 @@ private: } while(PendingRows.size() > 0 && freeSpace > 0 && hasSequences) { - ++rowsInReply; --UnprocessedRows; i64 rowSize = 0; NUdf::TUnboxedValue currentValue = std::move(PendingRows.front()); diff --git a/ydb/core/kqp/ut/common/kqp_ut_common.cpp b/ydb/core/kqp/ut/common/kqp_ut_common.cpp index 8b2b6a5394..1abc8271b4 100644 --- a/ydb/core/kqp/ut/common/kqp_ut_common.cpp +++ b/ydb/core/kqp/ut/common/kqp_ut_common.cpp @@ -771,8 +771,6 @@ TString StreamResultToYson(NYdb::NTable::TTablePartIterator& it, bool throwOnTim NYson::TYsonWriter writer(&out, NYson::EYsonFormat::Text, ::NYson::EYsonType::Node, true); writer.OnBeginList(); - ui32 profileIndex = 0; - for (;;) { auto streamPart = it.ReadNext().GetValueSync(); if (!streamPart.IsSuccess()) { @@ -789,8 +787,6 @@ TString StreamResultToYson(NYdb::NTable::TTablePartIterator& it, bool throwOnTim auto resultSet = streamPart.ExtractPart(); PrintResultSet(resultSet, writer); - - profileIndex++; } writer.OnEndList(); diff --git a/ydb/core/mind/hive/monitoring.cpp b/ydb/core/mind/hive/monitoring.cpp index dec113c569..e3757b674d 100644 --- a/ydb/core/mind/hive/monitoring.cpp +++ b/ydb/core/mind/hive/monitoring.cpp @@ -1309,8 +1309,6 @@ public: } void RenderHTMLPage(IOutputStream &out) { - ui64 nodes = 0; - ui64 tablets = 0; ui64 runningTablets = 0; ui64 aliveNodes = 0; THashMap<ui32, TMap<TString, ui32>> tabletsByNodeByType; @@ -1330,7 +1328,6 @@ public: ++runningTablets; ++tabletsByNodeByType[sl.NodeId][GetTabletType(pr.second.Type) + "s"]; } - ++tablets; } { auto it = tabletTypesToChannels.find(pr.second.Type); @@ -1339,15 +1336,11 @@ public: tabletTypesToChannels.emplace(pr.second.Type, channels); } } - ++tablets; } for (const auto& pr : Self->Nodes) { if (pr.second.IsAlive()) { ++aliveNodes; } - if (!pr.second.IsUnknown()) { - ++nodes; - } } out << "<head>"; diff --git a/ydb/core/mind/local.cpp b/ydb/core/mind/local.cpp index 07d4fc59ec..c0aaaa6395 100644 --- a/ydb/core/mind/local.cpp +++ b/ydb/core/mind/local.cpp @@ -231,7 +231,6 @@ class TLocalNodeRegistrar : public TActorBootstrapped<TLocalNodeRegistrar> { tabletType = record.GetTabletType(); } - ui32 tabletIdx = 0; for (const auto &tablet: OnlineTablets) { if (!isFilteringNeeded || tablet.second.TabletType == tabletType) { auto *info = result->Record.AddTabletInfo(); @@ -239,7 +238,6 @@ class TLocalNodeRegistrar : public TActorBootstrapped<TLocalNodeRegistrar> { info->SetFollowerId(tablet.first.second); info->SetTabletType(tablet.second.TabletType); info->SetBootMode(tablet.second.BootMode); - ++tabletIdx; } } diff --git a/ydb/core/testlib/tablet_helpers.cpp b/ydb/core/testlib/tablet_helpers.cpp index 61cd38d945..2f1f64a819 100644 --- a/ydb/core/testlib/tablet_helpers.cpp +++ b/ydb/core/testlib/tablet_helpers.cpp @@ -896,7 +896,6 @@ namespace NKikimr { if (SUPPRESS_REBOOTS || GetEnv("FAST_UT")=="1") return; - ui32 runCount = 0; ui32 eventCountBeforeReboot = 0; if (selectedReboot != Max<ui32>()) { eventCountBeforeReboot = selectedReboot; @@ -914,7 +913,6 @@ namespace NKikimr { Cout << "===> BEGIN dispatch: " << dispatchName << "\n"; try { - ++runCount; activeZone = false; TTestActorRuntime::TEventFilter filter = filterFactory(); TPipeResetObserver pipeResetingObserver(eventCountBeforeReboot, activeZone, filter, tabletIds); diff --git a/ydb/core/tx/schemeshard/schemeshard__operation_drop_pq.cpp b/ydb/core/tx/schemeshard/schemeshard__operation_drop_pq.cpp index 69ba3710ea..70d663c713 100644 --- a/ydb/core/tx/schemeshard/schemeshard__operation_drop_pq.cpp +++ b/ydb/core/tx/schemeshard/schemeshard__operation_drop_pq.cpp @@ -298,7 +298,6 @@ public: } void SetPQShards(TTopicInfo::TPtr pqGroup, TTxState& txState, TOperationContext& context) { - ui32 drops = 0; for (auto shard : pqGroup->Shards) { auto shardIdx = shard.first; TTopicTabletInfo::TPtr info = shard.second; @@ -308,7 +307,6 @@ public: TTxState::ETxState operation = TTxState::DeleteParts; if (tabletId != InvalidTabletId) { operation = TTxState::DropParts; - ++drops; } txState.Shards.emplace_back(shardIdx, ETabletType::PersQueue, operation); diff --git a/ydb/core/ymq/http/parser.rl6 b/ydb/core/ymq/http/parser.rl6 index 3d50ec6a65..076140ecff 100644 --- a/ydb/core/ymq/http/parser.rl6 +++ b/ydb/core/ymq/http/parser.rl6 @@ -178,6 +178,7 @@ void TParametersParser::Append(const TString& name, const TString& value) { const unsigned char *ts, *te; %% write init; + Y_UNUSED(Dc); Y_UNUSED(ts); Y_UNUSED(act); diff --git a/ydb/library/yql/minikql/comp_nodes/mkql_grace_join.cpp b/ydb/library/yql/minikql/comp_nodes/mkql_grace_join.cpp index 43812c7abb..42df38f9ed 100644 --- a/ydb/library/yql/minikql/comp_nodes/mkql_grace_join.cpp +++ b/ydb/library/yql/minikql/comp_nodes/mkql_grace_join.cpp @@ -498,7 +498,6 @@ TGraceJoinPacker::TGraceJoinPacker(const std::vector<TType *> & columnTypes, con ui32 currIntOffset = NullsBitmapSize * sizeof(ui64) ; ui32 currStrOffset = 0; ui32 currIOffset = 0; - ui32 currIdx = 0; std::vector<GraceJoin::TColTypeInterface> ctiv; bool prevKeyColumn = false; @@ -527,7 +526,6 @@ TGraceJoinPacker::TGraceJoinPacker(const std::vector<TType *> & columnTypes, con GraceJoin::TColTypeInterface cti{ MakeHashImpl(p.MKQLType), MakeEquateImpl(p.MKQLType), std::make_shared<TValuePacker>(true, p.MKQLType) , HolderFactory }; ColumnInterfaces.push_back(cti); } - currIdx++; } PackedKeyIntColumnsNum = (keyIntOffset + sizeof(ui64) - 1 ) / sizeof(ui64) - NullsBitmapSize; diff --git a/ydb/library/yql/minikql/comp_nodes/mkql_grace_join_imp.cpp b/ydb/library/yql/minikql/comp_nodes/mkql_grace_join_imp.cpp index 2681d89fab..51f78cb971 100644 --- a/ydb/library/yql/minikql/comp_nodes/mkql_grace_join_imp.cpp +++ b/ydb/library/yql/minikql/comp_nodes/mkql_grace_join_imp.cpp @@ -298,8 +298,6 @@ void TTable::Join( TTable & t1, TTable & t2, EJoinKind joinKind, bool hasMoreLef std::swap(JoinTable1, JoinTable2); } - ui64 tuplesFound = 0; - std::vector<ui64, TMKQLAllocator<ui64, EMemorySubPool::Temporary>> joinSlots, spillSlots, slotToIdx; std::vector<ui32, TMKQLAllocator<ui32, EMemorySubPool::Temporary>> stringsOffsets1, stringsOffsets2; ui64 reservedSize = 6 * (DefaultTupleBytes * DefaultTuplesNum) / sizeof(ui64); @@ -422,7 +420,6 @@ void TTable::Join( TTable & t1, TTable & t2, EJoinKind joinKind, bool hasMoreLef bool matchFound = false; if (keysValSize <= slotSize && !JoinTable1->NumberOfKeyIColumns ) { if (std::equal(it1 + keyIntOffset1, it1 + keysValSize, slotIt + keyIntOffset2)) { - tuplesFound++; matchFound = true; } } @@ -432,7 +429,6 @@ void TTable::Join( TTable & t1, TTable & t2, EJoinKind joinKind, bool hasMoreLef ui64 stringsPos = *(slotIt + headerSize2); ui64 stringsSize = *(it1 + headerSize1 - 1); if (std::equal(it1 + headerSize1, it1 + headerSize1 + stringsSize, spillSlots.begin() + stringsPos)) { - tuplesFound++; matchFound = true; } } @@ -482,7 +478,6 @@ void TTable::Join( TTable & t1, TTable & t2, EJoinKind joinKind, bool hasMoreLef } if (headerMatch && stringsMatch && iValuesMatch) { - tuplesFound++; matchFound = true; } diff --git a/ydb/library/yql/providers/dq/task_runner_actor/task_runner_actor.cpp b/ydb/library/yql/providers/dq/task_runner_actor/task_runner_actor.cpp index a6b5ddecd3..093ffbca84 100644 --- a/ydb/library/yql/providers/dq/task_runner_actor/task_runner_actor.cpp +++ b/ydb/library/yql/providers/dq/task_runner_actor/task_runner_actor.cpp @@ -121,7 +121,6 @@ private: } TOutputChannelReadResult ReadWithSpilling() { - int maxChunks = std::numeric_limits<int>::max(); bool changed = false; bool isChanFinished = false; i64 remain = ToPopSize; @@ -131,7 +130,6 @@ private: if (remain == 0) { // special case to WorkerActor remain = 5_MB; - maxChunks = 1; } auto spillingStorage = SpillingStorageInfo->SpillingStorage; @@ -165,7 +163,6 @@ private: data = LoadSpilled(std::move(blob)); remain -= data.Size(); result.DataChunks.emplace_back(std::move(data)); - --maxChunks; changed = true; hasData = true; } |