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.0p0 Hot Tips | CONFIDENTIAL | CodeSecure Inc |
A type is not explicitly specified in one of the following contexts.
When type is not explicitly specified in these cases, it is implicitly int. This may not be what the writer intended, or what a reader assumes.
| Class Name | Implicit Type | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Significance | style | ||||||||||||
| Mnemonic | LANG.STRUCT.DECL.IMPT | ||||||||||||
| Categories |
|
||||||||||||
| Availability | Available for C only (not 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="Implicit Type" |
f1(); /* 'Implicit Type' warning issued here * - return type implicitly int */ int f2(); /* ok: explicit return type */ g1(){ /* 'Implicit Type' warning issued here * - return type implicitly int */ return 42; } int g2(){ /* ok: explicit return type */ return 42; } int h1(const x); /* 'Implicit Type' warning issued here * - parameter type implicitly const int */ int h2(const int x); /* ok: explicit parameter type */ a_global1 = 42; /* 'Implicit Type' warning issued here * - variable type implicitly int */ int a_global2 = 42; /* ok: explicit variable type */ extern an_extern1; /* 'Implicit Type' warning issued here * - variable type implicitly int */ extern int an_extern2; /* ok: explicit variable type */
The following configuration file parameters affect checks for this warning class.