mirror of
https://cagebreak.project-repo.co/cagebreak.git
synced 2026-08-23 05:54:19 +02:00
Add fanalyzer development documentation
This commit is contained in:
parent
4bae00f593
commit
07ec19e45e
1 changed files with 29 additions and 0 deletions
29
README.md
29
README.md
|
|
@ -61,6 +61,35 @@ Nonetheless, don't be intimidated by the (slightly lengthy) release checklist or
|
|||
part of this file. Do what you can, open an issue and we will collaborate
|
||||
toward a solution.
|
||||
|
||||
### GCC and -fanalyzer
|
||||
|
||||
Cagebreak should be buildable with any reasonably new gcc or clang. Consider
|
||||
a gcc version of at least [10.1](https://gcc.gnu.org/gcc-10/changes.html) if
|
||||
you want to get the benefit of the brand-new
|
||||
[-fanalyzer](https://gcc.gnu.org/onlinedocs/gcc/Static-Analyzer-Options.html)
|
||||
flag. However, this new flag sometimes produces false-postives and we
|
||||
selectively disable warnings for affected code segments as described below.
|
||||
|
||||
Meson is configured to set 'CG_HAS_FANALYZE' if '-fanalyzer' is available.
|
||||
Because we also compile with clang for fuzzing, please use the following
|
||||
preprocessor statements before
|
||||
|
||||
```
|
||||
#if CG_HAS_FANALYZE
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "WARNING OPTION"
|
||||
#endif
|
||||
```
|
||||
and after
|
||||
|
||||
```
|
||||
#if CG_HAS_FANALYZE
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
```
|
||||
|
||||
the offending part of the code iff the warning is a false positive.
|
||||
|
||||
### Branching strategy
|
||||
|
||||
All features are to be developed on feature branches, named after the feature.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue