Date: prev next · Thread: first prev next last
2016 Archives by date, by thread · List index


Hello,

On pc Debianx86-64 with master sources, I've got this error:
/home/julien/lo/libreoffice/sc/source/core/data/markmulti.cxx: In member
function ‘void ScMultiSel::SetMarkArea(SCCOL, SCCOL, SCROW, SCROW, bool)’:
/home/julien/lo/libreoffice/sc/source/core/data/markmulti.cxx:242:50: error:
assuming signed overflow does not occur when assuming that (X + c) >= X is
always true [-Werror=strict-overflow]
             while ( nBeg != MAXROWCOUNT && nLast < nEndRow )
                                                                                     
^
cc1plus: all warnings being treated as errors

Searching on Opengrok, here are their type:
SCROW nBeg, nLast = nEndRow + 1; (see
http://opengrok.libreoffice.org/xref/core/sc/source/core/data/markmulti.cxx#225)
void ScMultiSel::SetMarkArea( SCCOL nStartCol, SCCOL nEndCol, SCROW
nStartRow, SCROW nEndRow, bool bMark ) (line 206 of same file)

Other warning I got is:
/home/julien/lo/libreoffice/vcl/unx/gtk/gtksalmenu.cxx: In function
‘MenuAndId {anonymous}::decode_command(const gchar*)’:
/home/julien/lo/libreoffice/vcl/unx/gtk/gtksalmenu.cxx:892:17: error: unused
variable ‘sWindow’ [-Werror=unused-variable]
         OString sWindow = sCommand.getToken(0, '-', nIndex);
                        ^
Indeed sWindow is only used in line 898:
assert(sWindow == "window" && pSalSubMenu);

Of course, I could remove --enable-werror but would like to know how to fix
these warnings properly.

Any thoughts?

Julien



--
View this message in context: 
http://nabble.documentfoundation.org/Build-warnings-on-Linux-strict-overflow-in-sc-unused-variable-in-vcl-tp4183244.html
Sent from the Dev mailing list archive at Nabble.com.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.