diff --git a/.travis.yml b/.travis.yml index 5a1bfc2f3dee233c9e67dadb14fea1e14b7bd02c..2addeb3d29d39ddc360928f99cdcc066d4a1bcdc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,7 @@ matrix: - os: linux dist: trusty sudo: required - env: CPPCHECK=yes CPPCHECK_VERSION=1.86 + env: CPPCHECK=yes CPPCHECK_VERSION=1.87 # test using external blas with internal lapack - os: linux if: branch =~ ^test- OR type IN(pull_request) diff --git a/src/core/PlumedMainInitializer.cpp b/src/core/PlumedMainInitializer.cpp index e3a0147aa1cf0b4bf2cedf6a656387fbf52feeba..c60f21137207300b3850d83a548dd97e55a560dd 100644 --- a/src/core/PlumedMainInitializer.cpp +++ b/src/core/PlumedMainInitializer.cpp @@ -240,6 +240,9 @@ public: // - on Linux if we don't use RTLD_DEFAULT, since dlopen(NULL,RTLD_LOCAL) returns a null pointer. if(handle) dlclose(handle); #endif +// I think this is a bug in cppcheck 1.87 +// Notice that if handle is NULL there's no point in dlclosing it. +// cppcheck-suppress resourceLeak } ~PlumedMainInitializer() { if(debug) fprintf(stderr,"+++ Finalizing PLUMED with plumed_symbol_table at %p\n",(void*)&plumed_symbol_table);