Page MenuHomePhabricator

A warning in the mitkMatrixTypeConversionTest.cpp causes clang compilers to fail.
Closed, ResolvedPublic

Description

Clang compiler produces the following warning which is treated as an error because it is located in MITK core. Fix it.

/run/media/cweber/Data/DartClients/mitk-clang-dartclient/MITK/Core/Code/Testing/mitkMatrixTypeConversionTest.cpp:58:40: error: adding 'unsigned int' to a string does not append to the string [-Werror,-Wstring-plus-int]

ss << "element [" << i << "][" + j << "] equal for mitkMatrix and podMatrix";
                          ~~~~~^~~

/run/media/cweber/Data/DartClients/mitk-clang-dartclient/MITK/Core/Code/Testing/mitkMatrixTypeConversionTest.cpp:58:40: note: use array indexing to silence this warning

ss << "element [" << i << "][" + j << "] equal for mitkMatrix and podMatrix";

Event Timeline

User wirkert has pushed new remote branch:

bug-17849-fixMitkMatrixTypeConversionTestForClang

Change consists solely of changing a '+' to '<<' for concatenation to silence a clang warning/error (-Wstring-plus-int) within mitkMatrixTypeConversionTest.cpp

[541ea1]: Merge branch 'bug-17849-fixMitkMatrixTypeConversionTestForClang'

Merged commits:

2014-06-11 14:23:32 Sebastian Wirkert [45ce38]
Removed not allowed + concatenation in stringstream and replaced it with <<.