Skip to content

Commit 184adef

Browse files
committed
add --library suggestions
1 parent 16e0b82 commit 184adef

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

man/checkers/unknownMacro.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ Your code is probably OK but you need to configure Cppcheck to understand the co
1717

1818
Review the configuration.
1919

20-
If Cppcheck warns about a macro that is defined in a header, make sure that this header is included properly. Cppcheck must have the include path.
20+
If Cppcheck warns about a macro that is defined in a 3rd party library, and there is a cfg file for that, then a `--library=` option may be a proper solution.
21+
22+
If Cppcheck warns about a macro that is defined in a header that should included, make sure that this header is included properly. Cppcheck must have the include path.
2123

2224
If Cppcheck warns about a compiler keyword add a `-D` that defines this keyword somehow. I.e. if cppcheck should just ignore the keyword then
2325
an `-DKEYWORD=` option is suggested.
@@ -38,7 +40,7 @@ Fix:
3840
Somehow `F_U64` must be specified for Cppcheck to be able to analyse this properly. Either:
3941
* Add `-DF_U64="x"` to explicitly tell Cppcheck what it should replace F_U64 with. Or;
4042
* Add `-I..` so that headers are included properly.
41-
43+
* If the symbol is defined in a 3rd party library adding a corresponding `--library=` might solve such issue.
4244

4345
### Example code 2
4446
```
@@ -55,6 +57,7 @@ Fix:
5557
Somehow `BOTAN_FUNC_ISA` must be specified for Cppcheck to be able to analyse this properly. Either:
5658
* Add `-DBOTAN_FUNC_ISA(X)=` to explicitly tell Cppcheck that BOTAN_FUNC_ISA("crypto") should be ignored. Or;
5759
* Add `-I..` so that headers are included properly.
60+
* If the symbol is defined in a 3rd party library adding a corresponding `--library=` might solve such issue.
5861

5962

6063

0 commit comments

Comments
 (0)