Phase 2: -Wsign-compare を潰して -Werror=sign-compare を有効化 - #69
Merged
Conversation
thawk105
force-pushed
the
werror-sign-compare
branch
from
May 14, 2026 06:26
43852ca to
68bdba2
Compare
This was referenced May 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#43 Phase 2 のサブタスク。
-Wsign-compareを潰し、ccbench_add_protocol()に-Werror=sign-compareを追加する。並列 subagent (background) が 4 commit + push まで実行、PR 作成段階で停止していたため、親エージェントが PR 作成 + CI watch を引き継いだ。
修正
subagent が小刻みに commit してくれているのでファイル単位:
9ef4f9cPhase 2: enable -Werror=sign-compare (cmake side)03a76e8Phase 2: fix sign-compare in include/bomb.hhf0397aaPhase 2: fix sign-compare in include/bomb_pessimistic.hh43852caPhase 2: fix sign-compare in masstree_wrapper.hh and cc/oze/util.cc修正パターン
-Wsign-compareの典型 (signed vssize_t/unsignedの比較) を各箇所で:int i; for(i=0; i<container.size(); ++i)系のループ counter → 容量を表す側に合わせて修正int↔google::uint32/google::uint64の比較 → cast or 型変更std::vector::size_type↔int64_tの比較 (masstree_wrapper の scan limit 周り)CMake
target_compile_options(${target} PRIVATE -Werror=maybe-uninitialized -Werror=unused-but-set-variable -Werror=unused-label -Werror=reorder -Werror=unused-parameter -Werror=catch-value - -Werror=unused-variable) + -Werror=unused-variable + -Werror=sign-compare)Subagent prompt 改善のメモ
前回 (1 回目) は context window 枯渇で死亡、進捗ゼロだった。今回 (再投入) は改良 prompt:
tee /tmp/build.log >/dev/null経由で抜粋のみ取得-j4固定詳細な学習は親エージェントの memory に保存済み。
Test plan
-DENABLE_SANITIZER=OFFで 34/34 確認 (subagent レポートより)Related
-Wignored-qualifiers、merged 待ち)