output_docbook.cpp warnings for comparison of different signedness
Richard Kimberly Heck
rikiheck at lyx.org
Mon Nov 30 16:16:27 UTC 2020
On 11/29/20 11:24 PM, Scott Kostyshak wrote:
> I get the following warnings:
>
> /home/scott/lyxbuilds/master/repo/src/output_docbook.cpp: In function ‘void lyx::{anonymous}::makeParagraph(const lyx::Text&, const lyx::Buffer&, lyx::XMLStream&, const lyx::OutputParams&, const const_iterator&)’:
> /home/scott/lyxbuilds/master/repo/src/output_docbook.cpp:357:26: error: comparison of integer expressions of different signedness: ‘long int’ and ‘long unsigned int’ [-Werror=sign-compare]
> 357 | special_case |= nInsets == parSize && std::all_of(par->insetList().begin(), par->insetList().end(), [](InsetList::Element inset) {
> | ~~~~~~~~^~~~~~~~~~
> /home/scott/lyxbuilds/master/repo/src/output_docbook.cpp:378:26: error: comparison of integer expressions of different signedness: ‘long int’ and ‘long unsigned int’ [-Werror=sign-compare]
> 378 | special_case |= nInsets == parSize && std::all_of(par->insetList().begin(), par->insetList().end(), isLyxCodeSpecialCase);
> | ~~~~~~~~^~~~~~~~~~
> /home/scott/lyxbuilds/master/repo/src/output_docbook.cpp: In lambda function:
> /home/scott/lyxbuilds/master/repo/src/output_docbook.cpp:401:17: error: comparison of integer expressions of different signedness: ‘long int’ and ‘long unsigned int’ [-Werror=sign-compare]
> 401 | if (nInsets != parSize)
> | ~~~~~~~~^~~~~~~~~~
> /home/scott/lyxbuilds/master/repo/src/output_docbook.cpp: In function ‘void lyx::{anonymous}::makeParagraph(const lyx::Text&, const lyx::Buffer&, lyx::XMLStream&, const lyx::OutputParams&, const const_iterator&)’:
> /home/scott/lyxbuilds/master/repo/src/output_docbook.cpp:412:26: error: comparison of integer expressions of different signedness: ‘long int’ and ‘long unsigned int’ [-Werror=sign-compare]
> 412 | special_case |= nInsets == parSize && std::all_of(par->insetList().begin(), par->insetList().end(), isFlexSpecialCase);
> | ~~~~~~~~^~~~~~~~~~
There are bazillions of these, scattered throughout the code. I've had a
serious look at some of them, a less serious look at others. For now,
you may well be best just to suppress them.
Riki
More information about the lyx-devel
mailing list