diff --git a/gui/help/manual.html b/gui/help/manual.html index 0d32b5959..a237cb848 100644 --- a/gui/help/manual.html +++ b/gui/help/manual.html @@ -706,90 +706,14 @@ CLASS="programlisting" >
Looking for memory leaks and resource leaks is a key feature of - Cppcheck. Cppcheck can detect many common mistakes by default. But through - some tweaking you can improve the checking.
Cppcheck understands many common allocation and - deallocation functions. But not all.
Here is example code that might leak memory or resources:
void foo(int x) -{ - void *f = CreateFred(); - if (x == 1) - return; - DestroyFred(f); -}
If you analyse that with Cppcheck it won't find any leaks:
cppcheck --enable=possibleError fred1.cpp
You can add some custom leaks checking by providing simple - implementations for the allocation and deallocation functions. Write - this in a separate file:
void *CreateFred() -{ - return malloc(100); -} - -void DestroyFred(void *p) -{ - free(p); -}
When Cppcheck see this it understands that CreateFred will return - allocated memory and that DestroyFred will deallocate memory.
Now, execute Cppcheck this way:
cppcheck --append=fred.cpp fred1.cpp
The output from cppcheck is:
Checking fred1.cpp... -[fred1.cpp:5]: (error) Memory leak: f
Cppcheck has a few checks that ensure that you don't break the basic guarantee of exception safety. It doesn't have any checks for the strong @@ -857,7 +781,7 @@ CLASS="chapter" >Chapter 9. Html reportChapter 8. Html report
You can convert the xml output from cppcheck into a html report. You'll need python and the pygments module @@ -903,14 +827,14 @@ CLASS="chapter" >Chapter 10. Graphical user interfaceChapter 9. Graphical user interface
A Cppcheck GUI is available.
10.2. Check source code9.2. Check source codeUse the 10.3. Inspecting results9.3. Inspecting results
The results are shown in a list.
10.4. Settings9.4. SettingsThe language can be changed at any time by using the @@ -989,7 +913,7 @@ CLASS="section" CLASS="section" >10.5. Project files9.5. Project files
The project files are used to store project specific settings.
diff --git a/man/cppcheck.1.xml b/man/cppcheck.1.xml
index 0d7736954..3c71bb7c1 100644
--- a/man/cppcheck.1.xml
+++ b/man/cppcheck.1.xml
@@ -102,7 +102,6 @@ man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/