sc/source/core/data/dociter.cxx: really suspicious use of ! in condition

Németh László nemeth at numbertext.org
Wed Feb 18 09:17:15 PST 2015


Hi,

2015-02-18 17:06 GMT+01:00 Stephan Bergmann <sbergman at redhat.com>:

> (In this particular case, the mistake was only originally introduced a few
> hours earlier, so likely no build with plugins enabled happened to stumble
> over it before it got fixed.)

In this particular case, really a useful compiler warning/error
detected the problem (and I was very glad of it :):

Box name: iOS-ARM at 29
 Branch: MASTER
 "starttime": 1424212524
 Machine: Darwin sniff.local 14.1.0 Darwin Kernel Version 14.1.0: Mon
Dec 22 23:10:38 PST 2014; root:xnu-2782.10.72~2/RELEASE_X86_64 x86_64
 Configured with: --with-parallelism=1
--with-distro=LibreOfficeiOS
--enable-symbols
--enable-werror
--disable-odk
--with-external-tar=/Users/tml/lo/core/src

 Commits since the last success:

 ==== core ====
  a5ab0e3  tdf#89436 handle skipping empty rows

...

[build CXX] sc/source/core/data/dociter.cxx
/Users/tml/lo/master-ios-arm/sc/source/core/data/dociter.cxx:2324:44:
error: logical not is only applied to the left hand side of this
comparison [-Werror,-Wlogical-not-parentheses]
        if ( !bRowEmpty && bRepeatedRow && ! nMinNextEnd < nRow ) //
use the data of the previous row
                                           ^             ~
/Users/tml/lo/master-ios-arm/sc/source/core/data/dociter.cxx:2324:44:
note: add parentheses after the '!' to evaluate the comparison first
        if ( !bRowEmpty && bRepeatedRow && ! nMinNextEnd < nRow ) //
use the data of the previous row
                                           ^
                                             (                 )
/Users/tml/lo/master-ios-arm/sc/source/core/data/dociter.cxx:2324:44:
note: add parentheses around left hand side expression to silence this
warning
        if ( !bRowEmpty && bRepeatedRow && ! nMinNextEnd < nRow ) //
use the data of the previous row
                                           ^
                                           (            )
1 error generated.
make[1]: *** [/Users/tml/lo/master-ios-arm/workdir/CxxObject/sc/source/core/data/dociter.o]
Error 1
make: *** [build] Error 2)

Best regards,
Laszlo


More information about the LibreOffice mailing list