Skip to content

findings: smlib#120's warning fixes checked against the port, none changes it (#2362) - #2391

Merged
bherbruck merged 2 commits into
tangency-labs:mainfrom
khanahmad4527:port-2362-usd-warnings
Nov 2, 2026
Merged

bherbruck merged 2 commits into
tangency-labs:mainfrom
khanahmad4527:port-2362-usd-warnings

Conversation

@khanahmad4527

@khanahmad4527 khanahmad4527 commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #2362.

tangency-labs/smlib#120 (e8cf987) makes SMLib compile clean under the USD build's warning flags; its fixes are commit 9846aa0, 19 warnings at 18 sites. I checked each site against its Rust counterpart. None needs a code change, so this PR is the record only: plan/findings/general--smlib-120-warning-fixes-checked-against-the-port.md, which maps every site (C++ file and function, Rust path and line, verdict).

Verdict Sites
Not applicable in Rust (the port cannot have the defect, or already behaves as the fixed C++) member init order (SmBlendCorner constructor); null-compare on a reference (SmBallPatch, SmProceduralBlend operator==); the seven -Wshadow=local renames (ExactMitreCurve, BallCentre, EvaluateDefinition, sm_DraftSeamPcurve, both CreateFilletBrep loops); the -Wswitch case (the Rust match has a do-nothing _ arm); the unused iDebugLevel (not ported); the refusal text passed as a format; the two %.200s bounds; the dead four-argument sm_HermitePoints
Not ported on main SmCrvInVolume::Dump (the delete [] fix), kf_InMaterial (dead in the fork, never ported), sm_SbGraphG1 (the setback corner, open as #2369, which keeps the term as a struct field, so it has no shadowing to fix), the SmBallPatch class
Observable difference none

The two real defects. The delete for new[] is in a debug dump the port does not have, and Rust frees by ownership. The refusal text used as a format is a constant with no %, so the C++ printed it correctly before the fix too, and the Rust builds the same text with to_string().

Refusal texts. The fix bounds the inserted text to 200 characters in two NoRoom messages. That text is ": a radius below <%.7g> fits" or ": no smaller ball fits there either", 36 characters at most, so the C++ messages are unchanged, and blend/fillet_executive/p3.rs:3491 and :3496 build the same text with format!. No message or result changes, so nothing is opt-in under section 4b.

Follow-up (not done here). blend/fillet_section/form.rs's hermite_points is the Rust copy of the four-argument sm_HermitePoints the fork deleted; only its own test calls it. Removing it and pointing that test at hermite_points_sided would keep the file in step with the fork. It has no effect on results.

Checks: scripts/ci/check_record_ids.py and scripts/ci/check-frozen-archives.sh pass. No Rust source changed, so no build or test run was needed.

khanahmad4527 and others added 2 commits November 2, 2026 19:31
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…y-labs#2362)

The fork's 9846aa0 fixes the USD build's 19 warnings at 18 sites. Each is
mapped to its Rust counterpart: none needs a change. The two real defects
are a dump the port does not have (delete for new[]) and a constant text
the port never uses as a format; the refusal texts the C++ now bounds to
200 characters insert at most 36, so they read the same in both.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@khanahmad4527 khanahmad4527 changed the title chore: smlib#120's warning fixes checked against the port (#2362) findings: smlib#120's warning fixes checked against the port, none changes it (#2362) Nov 2, 2026
@khanahmad4527
khanahmad4527 marked this pull request as ready for review November 2, 2026 14:07

@bherbruck bherbruck left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved by the automated first-pass review: CI green, mergeable, no CI/build/dependency file changes, no red-flag patterns in added code (process/network/env/unsafe outside FFI/blobs/hidden unicode), 0 known-mismatch entries added. Logic is gated by CI and the difftest merge queue.

@bherbruck
bherbruck merged commit fb8fa65 into tangency-labs:main Nov 2, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SMLib code compiles clean under the USD build's warning flags (19 warnings, 3 real defects)

2 participants