you suppress those warnings/errors by using suppress files. You best generate those with the command switch --gen-suppressions.
valgrind --tool=memcheck --leak-check=yes --gen-suppressions=yes ./yourapplication
valgrind --tool=memcheck --leak-check=yes --gen-suppressions=yes ./yourapplication
To copy to clipboard, switch view to plain text mode
You then copy paste the suppressions into a file, give them appropriate names and use that file with the --suppressions switch when debugging your application.
A suppress statement may look like this:
{
Qt-Gui-getpwuid
Memcheck:Leak
fun:malloc
obj:/lib/libc-2.6.1.so
fun:__nss_database_lookup
obj:*
obj:*
fun:getpwuid_r
obj:/usr/lib/qt4/libQtGui.so.4.3.2
obj:/usr/lib/qt4/libQtGui.so.4.3.2
fun:_SmcProcessMessage
fun:IceProcessMessages
obj:/usr/lib/qt4/libQtGui.so.4.3.2
obj:/usr/lib/qt4/libQtGui.so.4.3.2
}
{
Qt-Gui-getpwuid
Memcheck:Leak
fun:malloc
obj:/lib/libc-2.6.1.so
fun:__nss_database_lookup
obj:*
obj:*
fun:getpwuid_r
obj:/usr/lib/qt4/libQtGui.so.4.3.2
obj:/usr/lib/qt4/libQtGui.so.4.3.2
fun:_SmcProcessMessage
fun:IceProcessMessages
obj:/usr/lib/qt4/libQtGui.so.4.3.2
obj:/usr/lib/qt4/libQtGui.so.4.3.2
}
To copy to clipboard, switch view to plain text mode
You then call your application with the suppress file provided as an argument:
valgrind --tool=memcheck --leak-check=yes --suppressions=suppressfilexy.supp ./yourapplication
valgrind --tool=memcheck --leak-check=yes --suppressions=suppressfilexy.supp ./yourapplication
To copy to clipboard, switch view to plain text mode
Be careful not to put error-reports belonging to your applictations code into the suppress file.
Bookmarks