Skip to content

[Framework] Fix remaining warnings - #6438

Open
fredroy wants to merge 5 commits into
sofa-framework:masterfrom
fredroy:fix_remaining_warnings_framework
Open

fredroy wants to merge 5 commits into
sofa-framework:masterfrom
fredroy:fix_remaining_warnings_framework

Conversation

@fredroy

@fredroy fredroy commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Based on

tested on the 3 systems and in debug

[with-all-tests]


By submitting this pull request, I acknowledge that
I have read, understand, and agree SOFA Developer Certificate of Origin (DCO).


Reviewers will merge this pull-request only if

  • it builds with SUCCESS for all platforms on the CI.
  • it does not generate new warnings.
  • it does not generate new unit test failures.
  • it does not generate new scene test failures.
  • it does not break API compatibility.
  • it is more than 1 week old (or has fast-merge label).

@fredroy fredroy added pr: status to review To notify reviewers to review this pull-request pr: clean Cleaning the code pr: based on previous PR PR based on a previous PR, therefore to be merged ONLY subsequently pr: AI-aided Label notifying the reviewers that part or all of the PR has been generated with the help of an AI labels Oct 30, 2026
@hugtalbot hugtalbot removed the pr: based on previous PR PR based on a previous PR, therefore to be merged ONLY subsequently label Nov 5, 2026
fredroy and others added 4 commits November 9, 2026 07:13
- BaseMass: make the deprecated getPotentialEnergy(mparams) overload
  non-virtual (it was final) so Mass<T> no longer hides it
- ImplicitIntegrationScheme: mark integration factor methods override
- Remove unused MechanicalGetNonDiagonalMassesCountVisitor includes
- MechanicalOperations: silence deprecated-header messages for the
  PropagateDx visitors it still uses internally
- BaseLink::readFromSnapshot: rename the link value string so the
  loop variable linkPath no longer hides it (C4456)
- ObjectElement::initNode: rename local parent to parentElement so it
  no longer hides the Element::parent member (C4458)
- CompressedRowSparseMatrixGeneric::compressCSR: wrap the body in
  if constexpr (Policy::CompressZeros) instead of an early return
- FixedArrayTypeInfo::setSize: move the fallback return into an
  else branch of the if constexpr
- BackTrace: remove the dead return after the switch in SigDescription,
  the default case already returns
- DynamicLibrary: explicitly cast the GetProcAddress result to void*
  (-Wmicrosoft-cast)
- PipeProcess: remove the set-but-unused busy flag in the Windows
  branch (-Wunused-but-set-variable)
@fredroy
fredroy force-pushed the fix_remaining_warnings_framework branch from d9004f1 to 5686a71 Compare November 8, 2026 22:59
- BaseForceField, BaseMass: make the deprecated addDForce(mparams, dfId)
  and accFromF(mparams, aid) overloads non-virtual (they were final) so
  ForceField, Mass, PairInteractionForceField and
  MixedInteractionForceField no longer hide them (-Woverloaded-virtual)
- Core config: do not mark beginIntegration as deprecated when building
  Sofa.Simulation.Core, whose deprecated
  MechanicalBeginIntegrationVisitor still calls it
  (-Wdeprecated-declarations)
- MechanicalIntegrationVisitor: silence the deprecated-header message
  of MechanicalBeginIntegrationVisitor, which it still uses
- DefaultAnimationLoop: remove the unused
  MechanicalBeginIntegrationVisitor include and mark dt as unused
  (-Wunused-parameter)
- MechanicalMassLinearSolveVisitor: include its own header instead of
  the deprecated MechanicalAccFromFVisitor.h
- Mass overrode the deprecated ForceField::addDForce(mparams, df, dx)
    with an empty body, which triggered C4996 in every module including
    Mass.h (e.g. Sofa.Simulation.Core). The base implementation is also
    empty, so removing the override keeps the same behavior
@fredroy
fredroy force-pushed the fix_remaining_warnings_framework branch from 5686a71 to ea0a4d0 Compare November 9, 2026 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: AI-aided Label notifying the reviewers that part or all of the PR has been generated with the help of an AI pr: clean Cleaning the code pr: status to review To notify reviewers to review this pull-request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants