[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi] xmlwrapp '-Wconversion' warnings [Was: xmlwrapp '-Wnull-dereferenc
From: |
Greg Chicares |
Subject: |
[lmi] xmlwrapp '-Wconversion' warnings [Was: xmlwrapp '-Wnull-dereference' warning] |
Date: |
Sat, 23 Mar 2019 11:07:10 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 |
On 2019-03-22 00:23, Greg Chicares wrote:
> Enabling '-Wnull-dereference' for lmi builds
Later, building with a x86_64-w64-mingw32 toolchain, I saw:
x86_64-w64-mingw32-g++ -c -I /opt/lmi/src/lmi -I /opt/lmi/third_party/include
-I /opt/lmi/third_party/src -I /opt/lmi/local/include -I
/opt/lmi/local/include/libxml2 -DLIBXML_USE_DLL -std=c++17 -Werror -Wconversion
/opt/lmi/src/lmi/xml_xslt_wrapp.cpp -oxml_xslt_wrapp.o 2>&1 |less -S
In file included from /opt/lmi/src/lmi/xml_xslt_wrapp.cpp:31:
/opt/lmi/third_party/src/libxml/event_parser.cxx: In member function 'bool
xml::event_parser::parse
_chunk(const char*, xml::event_parser::size_type)':
/opt/lmi/third_party/src/libxml/event_parser.cxx:403:51: error: conversion from
'xml::event_parser::size_type' {aka 'long long unsigned int'} to 'int' may
change value [-Werror=conversion]
xmlParseChunk(pimpl_->parser_context_, chunk, length, 0);
^~~~~~
In file included from /opt/lmi/src/lmi/xml_xslt_wrapp.cpp:33:
/opt/lmi/third_party/src/libxml/node.cxx: In constructor
'xml::node::node(xml::node::cdata)':
/opt/lmi/third_party/src/libxml/node.cxx:324:109: error: conversion from
'size_t' {aka 'long long unsigned int'} to 'int' may change value
[-Werror=conversion]
if ( (pimpl_->xmlnode_ = xmlNewCDataBlock(0, reinterpret_cast<const
xmlChar*>(cdata_info.t), std::strlen(cdata_info.t))) == 0)
~~~~~~~~~~~^~~~~~~~~~~~~~
In file included from /opt/lmi/src/lmi/xml_xslt_wrapp.cpp:39:
/opt/lmi/third_party/src/libxml/tree_parser.cxx: In member function 'void
xml::tree_parser::init(const char*, xml::tree_parser::size_type,
xml::error_handler*)':
/opt/lmi/third_party/src/libxml/tree_parser.cxx:202:50: error: conversion from
'xml::tree_parser::size_type' {aka 'long long unsigned int'} to 'int' may
change value [-Werror=conversion]
if ( (ctxt = xmlCreateMemoryParserCtxt(data, size)) == 0)
^~~~
- [lmi] xmlwrapp '-Wnull-dereference' warning, Greg Chicares, 2019/03/21
- [lmi] xmlwrapp '-Wswitch-enum' warning [Was: xmlwrapp '-Wnull-dereference' warning], Greg Chicares, 2019/03/21
- [lmi] xmlwrapp '-Wconversion' warnings [Was: xmlwrapp '-Wnull-dereference' warning],
Greg Chicares <=
- Re: [lmi] xmlwrapp '-Wconversion' warnings, Vadim Zeitlin, 2019/03/24
- Re: [lmi] xmlwrapp '-Wconversion' warnings, Greg Chicares, 2019/03/24
- Re: [lmi] xmlwrapp '-Wconversion' warnings, Vadim Zeitlin, 2019/03/26
- Re: [lmi] xmlwrapp '-Wconversion' warnings, Greg Chicares, 2019/03/26
- Re: [lmi] xmlwrapp '-Wconversion' warnings, Vadim Zeitlin, 2019/03/27
- Re: [lmi] xmlwrapp '-Wconversion' warnings, Greg Chicares, 2019/03/27