WaE in filter/source/svg/svgreader.cxx

julien2412 serval2412 at yahoo.fr
Tue May 8 02:31:13 PDT 2012


Hello,

I've got a WaE in master sources with the file
filter/source/svg/svgreader.cxx.
Here is the result of compilation :
/home/julien/compile-libreoffice/libo/filter/source/svg/svgreader.cxx: In
function ‘void svgi::{anonymous}::visitChildren(const Func&,
com::sun::star::uno::Reference<com::sun::star::xml::dom::XElement>,
com::sun::star::xml::dom::NodeType) [with Func =
boost::_bi::bind_t<rtl::OUStringBuffer&amp;,
boost::_mfi::mf1&lt;rtl::OUStringBuffer&amp;, rtl::OUStringBuffer, const
rtl::OUString&amp;>,
boost::_bi::list2<boost::reference_wrapper&lt;rtl::OUStringBuffer>,
boost::_bi::bind_t<rtl::OUString, boost::_mfi::mf0&lt;rtl::OUString,
com::sun::star::xml::dom::XNode>, boost::_bi::list1<boost::arg&lt;1> > > >
>]’:
/home/julien/compile-libreoffice/libo/filter/source/svg/svgreader.cxx:1506:59:  
instantiated from here
/home/julien/compile-libreoffice/libo/filter/source/svg/svgreader.cxx:138:691:
error: passing ‘com::sun::star::xml::dom::NodeType’ chooses ‘int’ over
‘unsigned int’ [-Werror=sign-promo]
/home/julien/compile-libreoffice/libo/filter/source/svg/svgreader.cxx:138:691:
error:   in call to ‘std::basic_ostream<_CharT, _Traits>&
std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char,
_Traits = std::char_traits<char>]’ [-Werror=sign-promo]
cc1plus: all warnings being treated as errors
make[1]: ***
[/home/julien/compile-libreoffice/libo/workdir/unxlngx6/CxxObject/filter/source/svg/svgreader.o]
Erreur 1
make: *** [filter] Erreur 2

Here are the lines :
    136     for( sal_Int32 i=0; i<nNumNodes; ++i )
    137     {
    138         SAL_INFO(&quot;svg&quot;, &quot;node type: &quot; &lt;&lt;
xChildren->item(i)->getNodeType() << " tag name " <<
xChildren->item(i)->getNodeName() << " value |" <<
xChildren->item(i)->getNodeValue() << "|");

If either i put a static_cast with sal_Int32 or sal_uInt32 for
"xChildren->item(i)->getNodeType()", compilation works.
But I read this link
http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.19 and NodeType is
an enumeration if I don't mistake.
So what's the best way to remove this WaE ?

Julien.
PS : of course it's just a WaE so not urgent at all :-)

--
View this message in context: http://nabble.documentfoundation.org/WaE-in-filter-source-svg-svgreader-cxx-tp3970842.html
Sent from the Dev mailing list archive at Nabble.com.


More information about the LibreOffice mailing list