You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: man/checkers/unknownMacro.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,9 @@ Your code is probably OK but you need to configure Cppcheck to understand the co
17
17
18
18
Review the configuration.
19
19
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.
21
23
22
24
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
23
25
an `-DKEYWORD=` option is suggested.
@@ -38,7 +40,7 @@ Fix:
38
40
Somehow `F_U64` must be specified for Cppcheck to be able to analyse this properly. Either:
39
41
* Add `-DF_U64="x"` to explicitly tell Cppcheck what it should replace F_U64 with. Or;
40
42
* 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.
42
44
43
45
### Example code 2
44
46
```
@@ -55,6 +57,7 @@ Fix:
55
57
Somehow `BOTAN_FUNC_ISA` must be specified for Cppcheck to be able to analyse this properly. Either:
56
58
* Add `-DBOTAN_FUNC_ISA(X)=` to explicitly tell Cppcheck that BOTAN_FUNC_ISA("crypto") should be ignored. Or;
57
59
* 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.
0 commit comments