MDEV-37615: Clang based static analysis false positive reports on UNINIT_VAR
- [x] The Jira issue number for this PR is: MDEV-37615
Description
Clang static analysis tools like Infer, are written around static analysis and not undefined behaviour detection at runtime.
They have no -fsanitize=undefined implemented.
We'd like them to follow the path #define UNINIT_VAR(x) x which is what our release binaries use. This is the only sane path for analysis that will detect uninitalization in various forms.
Clang based compilers with error during compilation if any uninitialized behaviour is detected at compile time because of 0c80ddb519bd06efbd7ccf2a2487b2503cd16db5.
Corrects MDEV-36542 - 6fd57f478f585249bdca242b1576ac0a7bd7aacf.
Release Notes
nothing - clang not used as part of release.
How can this PR be tested?
Attempt to use infer to staticly analyse.
If the changes are not amenable to automated testing, please explain why not and carefully describe how to test manually.
Basing the PR against the correct MariaDB version
- [ ] This is a new feature or a refactoring, and the PR is based against the
mainbranch. - [X] This is a bug fix, and the PR is based against the earliest maintained branch in which the bug can be reproduced.
PR quality check
- [X] I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
- [ ] For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.