Skip to content

[Config] Trigger an error when a non-void function does not return - #6451

Open
fredroy wants to merge 1 commit into
sofa-framework:masterfrom
fredroy:trigger_error_when_no_return
Open

fredroy wants to merge 1 commit into
sofa-framework:masterfrom
fredroy:trigger_error_when_no_return

Conversation

@fredroy

@fredroy fredroy commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

non-void function not returning is undefined behavior and can lead to weird problems/crashes

By default, compilers throw a warning but this PR enforces this by throwing an error instead.

[with-all-tests]

[ci-depends-on https://github.com/sofa-framework/SofaPython3/pull/654]


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 labels Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

1 participant