From 7693a2b6e63507fc46a0169957acc84e79e03c6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sun, 8 Nov 2009 19:26:15 +0100 Subject: [PATCH] webpage: removed the index.html and help.html --- htdocs/help.html | 97 ----------------------------------------------- htdocs/index.html | 9 ----- 2 files changed, 106 deletions(-) delete mode 100644 htdocs/help.html delete mode 100644 htdocs/index.html diff --git a/htdocs/help.html b/htdocs/help.html deleted file mode 100644 index f4bf017eb..000000000 --- a/htdocs/help.html +++ /dev/null @@ -1,97 +0,0 @@ - - - -

Help

- -

If you have a question, you can ask in our forum.

- - -

First example

- -Here is a simple code: -
int main()
-{
-    char a[10];
-    a[10] = 0;
-    return 0;
-}
- -If you save that into file1.c and execute: - -
cppcheck file1.c
-The output from cppcheck will then be: -
Checking file1.c...
-[file1.c:4]: (error) Array index out of bounds
- -

Checking all files in a folder

- -Normally a program has many sourcefiles. And you want to check them all. Cppcheck can check all sourcefiles in a directory: -
cppcheck path
- -If "path" is a folder all sourcefiles in it will be checked: - -
Checking path/file1.cpp...
-1/2 files checked 50% done
-Checking path/file2.cpp...
-2/2 files checked 100% done
- - -

Uncertain errors

- -

By default, only certain errors are reported.

- -

With "--all" you will get more reports. But beware - some messages may be wrong.

- -

Here is a simple code example:

- -
void f()
-{
-    Fred *fred = new Fred;
-}
- -

Execute this command:

- -
cppcheck --all file1.cpp
- -

The output from Cppcheck:

- -
[file1.cpp:4]: (possible error) Memory leak: fred
- -

The "possible" means that the reported message may be wrong (if Fred has automatic deallocation it is not a memory leak).

- - -

Stylistic issues

- -

By default Cppcheck will only check for bugs. There are also a few checks for stylistic issues.

- -

Here is a simple code example:

- -
void f(int x)
-{
-    int i;
-    if (x == 0)
-    {
-        i = 0;
-    }
-}
- -

To enable stylistic checks, use the --style flag:

- -
cppcheck --style file3.c
- -
[file3.c:3]: (style) The scope of the variable i can be limited
- - -

More..

- -

You can generate XML output:

-
cppcheck --xml file3.c
- -

You can suppress certain errors:

-
cppcheck --suppressions=mysuppressions.txt file3.c
- -

If you get false positives about memory leaks because of automatic deallocation:

-
cppcheck --auto-dealloc autodealloc.lst file4.cpp
- - - diff --git a/htdocs/index.html b/htdocs/index.html deleted file mode 100644 index 15580fd0b..000000000 --- a/htdocs/index.html +++ /dev/null @@ -1,9 +0,0 @@ - - -Cppcheck - - - - - -