Fix cppcheck warnings

This commit is contained in:
Jason Turner 2016-01-29 20:00:20 -07:00
parent 0dab950ebf
commit 7f4ef8d8fd
2 changed files with 8 additions and 6 deletions

View File

@ -34,7 +34,7 @@ compilers:
cmake_extra_flags: -DBUILD_SAMPLES:BOOL=ON -DBUILD_PACKAGE:BOOL=ON -DBUILD_TESTING:BOOL=ON -DRUN_PERFORMANCE_TESTS:BOOL=ON
collect_performance_results: true
- name: cppcheck
compiler_extra_flags: --enable=all -I include --inline-suppr -Umax --suppress="*:cmake*" --suppress="*:unittests/catch.hpp" --force
compiler_extra_flags: --enable=all -I include --inline-suppr -Umax --suppress="*:unittests/catch.hpp" --force --suppress="unusedFunction:*"
- name: custom_check
commands:
- ./contrib/check_for_tabs.rb

View File

@ -7,6 +7,9 @@ int main( int /*argc*/ , char * /*argv*/[] )
{
chaiscript::ChaiScript ch( chaiscript::Std_Lib::library( ) );
try
{
static const char script[ ] =
R""(
@ -19,8 +22,7 @@ int main( int /*argc*/ , char * /*argv*/[] )
)"";
try
{
ch.eval( script );
}
catch ( const std::exception &e )