manual.md: replace __MSCVER with _MSC_VER, that is more correct
This commit is contained in:
parent
03c2c88d1e
commit
5461fb64e3
|
@ -607,16 +607,16 @@ Imagine this source code:
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
x = 0;
|
x = 0;
|
||||||
#endif
|
#endif
|
||||||
#ifdef __MSCVER
|
#ifdef _MSC_VER
|
||||||
x = 1;
|
x = 1;
|
||||||
#endif
|
#endif
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
||||||
By default Cppcheck will try to check all the configurations. There are 3 important configurations here:
|
By default Cppcheck will try to check all the configurations. There are 3 important configurations here:
|
||||||
* Neither `__GNUC__` nor `__MSCVER` is defined
|
* Neither `__GNUC__` nor `_MSC_VER` is defined
|
||||||
* `__GNUC__` is defined
|
* `__GNUC__` is defined
|
||||||
* `__MSCVER` is defined
|
* `_MSC_VER` is defined
|
||||||
|
|
||||||
When you run Cppcheck, the output will be something like:
|
When you run Cppcheck, the output will be something like:
|
||||||
|
|
||||||
|
@ -624,7 +624,7 @@ When you run Cppcheck, the output will be something like:
|
||||||
Checking test.c ...
|
Checking test.c ...
|
||||||
[test.c:10]: (error) Uninitialized variable: x
|
[test.c:10]: (error) Uninitialized variable: x
|
||||||
Checking test.c: __GNUC__...
|
Checking test.c: __GNUC__...
|
||||||
Checking test.c: __MSCVER...
|
Checking test.c: _MSC_VER...
|
||||||
|
|
||||||
Now if you want you can limit the analysis. You probably know what the target compiler is. If `-D` is supplied and you do not specify `--force` then Cppcheck will only check the configuration you give.
|
Now if you want you can limit the analysis. You probably know what the target compiler is. If `-D` is supplied and you do not specify `--force` then Cppcheck will only check the configuration you give.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue