Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9e71e7f

Browse files
committed
C++: Added .qlhelp file
1 parent e4def73 commit 9e71e7f

2 files changed

Lines changed: 31 additions & 0 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
void calls() {
2+
undeclared_function(1, 2);
3+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!DOCTYPE qhelp PUBLIC
2+
"-//Semmle//qhelp//EN"
3+
"qhelp.dtd">
4+
<qhelp>
5+
6+
7+
<overview>
8+
<p>A function is called without a prior function declaration or definition.
9+
When this happens, the compiler generates an implicit declaration of the function,
10+
specifying an integer return type and no parameters.</p>
11+
</p>
12+
13+
<p>This may indicate a misspelled function name, or that the required header containing
14+
the function declaration has not been included.</p>
15+
16+
</overview>
17+
<recommendation>
18+
<p>Ensure that the called function has been declared previously in the file or an included header file.</p>
19+
20+
</recommendation>
21+
<example><sample src="ImplicitFunctionDeclaration.c" />
22+
23+
</example>
24+
25+
<references>
26+
<li>SEI CERT C Coding Standard: <a href="https://wiki.sei.cmu.edu/confluence/display/c/DCL31-C.+Declare+identifiers+before+using+them"> DCL20-C. Explicitly specify void when a function accepts no arguments </a></li>
27+
</references>
28+
</qhelp>

0 commit comments

Comments
 (0)