• Stephan Bergmann's avatar
    Silence loplugin:redundantcast false warning · be067003
    Stephan Bergmann yazdı
    ...that is curiously only reported when building with clang -std=gnu++17:
    
    > sc/qa/unit/ucalc_condformat.cxx:185:80: error: redundant const_cast from 'ScConditionalFormat *' to 'const ScConditionalFormat *', result is implictly cast to 'const ScConditionalFormat *const' [loplugin:redundantcast]
    >     CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong conditional format instance.", pCheck, const_cast<const ScConditionalFormat*>(pFormat));
    >     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    > workdir/UnpackedTarball/cppunit/include/cppunit/TestAssert.h:230:32: note: expanded from macro 'CPPUNIT_ASSERT_EQUAL_MESSAGE'
    >                               (actual),                \
    >                               ~^~~~~~~
    > 1 error generated.
    > make[1]: *** [solenv/gbuild/LinkTarget.mk:270: workdir/CxxObject/sc/qa/unit/ucalc_condformat.o] Error 1
    
    Change-Id: If2e8577bad4ec7454d584eb59106734d47f876ad
    be067003
redundantcast.cxx 18.7 KB