JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.
If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.
If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.
| CodeSonar® 9.2p0 | CONFIDENTIAL | CodeSecure Inc |
The #include or #include_next preprocessor directive is not followed by a string of the form <filename> or "filename".
Note that many such malformed directives will trigger parse errors, either in your native compiler or in the CodeSonar parser. Such a parse error will prevent a Malformed #include warning from being issued; correcting the parse error will also correct the malformedness problem.
This warning class is a strict subset of Inappropriate Include File Specification.
| Class Name | Malformed #include | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Significance | style | |||||||||||||||||||||
| Mnemonic | LANG.PREPROC.INCL.MF | |||||||||||||||||||||
| Categories |
|
|||||||||||||||||||||
| Availability | Available for C and C++. |
|||||||||||||||||||||
| Enabling | Checks for this warning class are
disabled by default. To enable them, add the following WARNING_FILTER
rule to the project configuration file.
WARNING_FILTER += allow class="Malformed #include" |
Many compilers will fail with an error if they encounter a malformed #include directive. If you are using such a compiler you will generally detect and resolve bugs of this class at compilation time, before the CodeSonar analysis runs.
#include "stdio.h" /* has form "filename" */ /* Attempting to compile with a malformed #include will cause an error * in many compilers, so we preprocess this line out to ensure the * example can be compiled. CodeSonar will still issue a warning. */ #if 0 #include otherheader.h /* 'Malformed #include' issued here */ #endif
The following configuration file parameters affect checks for this warning class.
To report problems with this documentation, please visit https://support.codesecure.com/.