Checking /home/test/cppcheck/example.cpp ... Checking /home/test/cppcheck/example.cpp: ALLOC_HOOK_VERSION=0xfe9abbf;__PIC__=1... /home/test/cppcheck/example.cpp:13:10: style: Variable 'intPtr' can be declared as pointer to const [constVariablePointer] int* intPtr = new int[100]...
Example, compiling Cppcheck with cmake:mkdir build cd build cmake .. cmake --build .If you want to compile the GUI you can use the flag. -DBUILD_GUI=ONFor rules support (requires pcre) use the flag. -DHAVE_RULES=ONFor release builds it is recommended that you use: -DUSE_MATCH...
Use of obsolete functions; Check input/output operations; Null pointer dereferencing.Examples of diagnosticsBelow you will find a few samples of errors, which the Cppcheck analyzer is able to detect.Sample 1. The MPlayer projectIn this code, the issue of missing data is processed incorrectly. If...
* missingInclude Warn if there are missing includes. For detailed information, use '--check-config'. Several ids can be given if you separate them with commas. See also --std --error-exitcode=<n> If errors are found, integer [n] is returned instead of the default '0'. '1' is ret...
astyle [options] < Original > Beautified When indenting a specific file, the resulting indented file RETAINS the original file-name. The original pre-indented file is renamed, with a suffix of ".orig" added to the original filename.
For example these ones from the pygame code base: [src_c/math.c:1134]: (style) The function 'vector_getw' is never used. [src_c/base.c:1309]: (error) Pointer addition with NULL pointer. [src_c/scrap_qnx.c:109]: (portability) Assigning a pointer to an integer is not portable. ...
# output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or ...
# You can put \n's in the value part of an alias to insert newlines. ALIASES = # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding
# output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or ...