Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

std.cfg: added EXIT_SUCCESS and EXIT_FAILURE #6223

Merged
merged 1 commit into from
Apr 3, 2024

Conversation

firewave
Copy link
Collaborator

@firewave firewave commented Apr 3, 2024

Although the values are implementation dependent and thus not documented, they reflect the common values of 0 and positive non-0 for success/failure. For the analysis it is also not important that these are correct but that they are being consistent across the code.

https://en.cppreference.com/w/cpp/utility/program/EXIT_status

Although the values are implementation dependent and thus not documented, they reflect the common values of 0 and positive non-0 for success/failure. For the analysis it is also not important that these are correct but that they are being consistent across the code.

https://en.cppreference.com/w/cpp/utility/program/EXIT_status
@firewave
Copy link
Collaborator Author

firewave commented Apr 3, 2024

This is used in our own code:

cli/cppcheckexecutor.cpp:191:16: debug: valueFlowConditionExpressions bailout: Skipping function due to incomplete variable EXIT_FAILURE [valueFlowBailoutIncompleteVar]
        return EXIT_FAILURE;
               ^

And are top results in daca:

3507 EXIT_FAILURE
[...]
1975 EXIT_SUCCESS

@orbitcowboy orbitcowboy merged commit f94a60d into danmar:main Apr 3, 2024
64 checks passed
@firewave firewave deleted the std-exit branch April 3, 2024 09:46
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.

2 participants