Repository navigation
json: fix vajson shadow/sign-conversion warnings - #690
Merged
Merged
Conversation
mihajlo-k
requested review from
4og,
antonkri,
arkjedrz,
fbaeuerle and
pawelrutkaq
as code owners
October 14, 2026 19:13
mihajlo-k
had a problem deploying
to
workflow-approval
October 14, 2026 19:13 — with
GitHub Actions
Error
mihajlo-k
had a problem deploying
to
workflow-approval
October 14, 2026 19:13 — with
GitHub Actions
Error
mihajlo-k
had a problem deploying
to
workflow-approval
October 14, 2026 19:13 — with
GitHub Actions
Error
mihajlo-k
had a problem deploying
to
workflow-approval
October 14, 2026 19:13 — with
GitHub Actions
Error
mihajlo-k
had a problem deploying
to
workflow-approval
October 14, 2026 19:13 — with
GitHub Actions
Error
Contributor
|
Documentation preview for this pull request is available at: |
mihajlo-k
force-pushed
the
mk_fix_compiler_warnings
branch
from
October 14, 2026 19:53
f818abc to
8f8cbfe
Compare
mihajlo-k
had a problem deploying
to
workflow-approval
October 14, 2026 19:54 — with
GitHub Actions
Error
mihajlo-k
had a problem deploying
to
workflow-approval
October 14, 2026 19:54 — with
GitHub Actions
Error
mihajlo-k
had a problem deploying
to
workflow-approval
October 14, 2026 19:54 — with
GitHub Actions
Error
mihajlo-k
had a problem deploying
to
workflow-approval
October 14, 2026 19:54 — with
GitHub Actions
Error
mihajlo-k
had a problem deploying
to
workflow-approval
October 14, 2026 19:54 — with
GitHub Actions
Error
In `JsonOps::ReadExactly` the lambda passed to and_then declared a local `result` while an enclosing local of the same name was in scope. Rename the inner one to `read_result`. In `JsonData::Restore`, `static_cast<std::streampos>` does not suppress `-Wsign-conversion`, because `std::streampos` is the class `std::fpos<std::mbstate_t>`: the unsigned-to-signed conversion happens implicitly on its `std::streamoff` constructor argument, where the explicit cast gives no cover. Cast to `std::streamoff` directly, which is what the two-argument `seekg` overload takes anyway, and which also drops a pointless `fpos` round-trip. The value is already range-checked against `std::int64_t` above the call. Enable COMPILER_WARNING_FEATURES on vajson_impl. Fixes eclipse-score#686
mihajlo-k
force-pushed
the
mk_fix_compiler_warnings
branch
from
October 15, 2026 10:09
8f8cbfe to
0798860
Compare
mihajlo-k
temporarily deployed
to
workflow-approval
October 15, 2026 10:09 — with
GitHub Actions
Inactive
mihajlo-k
temporarily deployed
to
workflow-approval
October 15, 2026 10:09 — with
GitHub Actions
Inactive
mihajlo-k
temporarily deployed
to
workflow-approval
October 15, 2026 10:09 — with
GitHub Actions
Inactive
mihajlo-k
temporarily deployed
to
workflow-approval
October 15, 2026 10:09 — with
GitHub Actions
Inactive
mihajlo-k
temporarily deployed
to
workflow-approval
October 15, 2026 10:09 — with
GitHub Actions
Inactive
4og
approved these changes
Oct 15, 2026
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The changes are narrowly scoped, preserve existing behavior, and have no identified blocking issues.
0 open findings
What changed in this PR
Fixes vajson compiler warnings reported in #686 and enables the repository’s compiler warning features.
Changes:
- Renames a shadowing local variable in
ReadExactly. - Casts the seek offset directly to
std::streamoff. - Enables
COMPILER_WARNING_FEATURESforvajson_impl.
| File | Description |
|---|---|
| score/json/internal/parser/vajson/vajson_impl/reader/json_data.cpp | Fixes the sign-conversion warning. |
| score/json/internal/parser/vajson/vajson_impl/reader/internal/json_ops.cpp | Removes local-variable shadowing. |
| score/json/internal/parser/vajson/vajson_impl/BUILD | Enables compiler warning features. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
4og
enabled auto-merge
October 15, 2026 10:41
Merged
via the queue into
eclipse-score:main
with commit Oct 15, 2026
8535148
28 of 29 checks passed
This branch was previously deployed
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.
JsonOps::ReadExactlythe lambda passed to and_then declared a localresultwhile an enclosing local of the same name was in scope. Rename the inner one toread_result.JsonData::Restore,static_cast<std::streampos>does not suppress-Wsign-conversion, becausestd::streamposis the classstd::fpos<std::mbstate_t>: the unsigned-to-signed conversion happens implicitly on itsstd::streamoffconstructor argument, where the explicit cast gives no cover. Cast tostd::streamoffdirectly, which is what the two-argumentseekgoverload takes anyway, and which also drops a pointlessfposround-trip. The value is already range-checked againststd::int64_tabove the call.COMPILER_WARNING_FEATURESon vajson_implFixes #686