... for some soltools C programs"
The issues previously seen with current glibc versions are
now addressed differently by
Change-Id: I53d66f280ea82d295a2c2c086f4d02a965a893d7
Author: Stephan Bergmann <stephan.bergmann@collabora.com>
Date: Wed Sep 16 13:08:28 2026 +0200
Adapt loplugins to glibc 2.44 assert macro internals
, so revert the previous workaround again.
This reverts commit 5d72f86b56.
Change-Id: Ide517b9592ee1dbf444f000f48b901d474352c07
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211064
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
...which started to cause issues like
> [CXX] sal/osl/all/acceptableaccessdenial.cxx
> engine/sal/osl/all/acceptableaccessdenial.cxx:30:5: error: implicit conversion (IntegralCast) from 'bool' to 'int' [loplugin:implicitboolconversion]
> 30 | assert(acceptableAccessDenials > 0);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/include/assert.h:139:23: note: expanded from macro 'assert'
> 139 | ? void (1 ? 1 : bool (__VA_ARGS__)) \
> | ^~~~~~~~~~~~~~~~~~
> engine/sal/osl/all/acceptableaccessdenial.cxx:30:5: error: redundant functional cast from 'bool' to 'bool' [loplugin:redundantcast]
> 30 | assert(acceptableAccessDenials > 0);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /usr/include/assert.h:139:23: note: expanded from macro 'assert'
> 139 | ? void (1 ? 1 : bool (__VA_ARGS__)) \
> | ^~~~~~~~~~~~~~~~~~
and
> [C ] soltools/cpp/_tokens.c
> engine/soltools/cpp/_tokens.c:56:17: error: possibly unwanted implicit conversion when calling bool param [loplugin:pointerbool]
> 56 | assert(trp->bp); // realloc failure is OOM -> no point to handle
> | ~~~~~^~
> /usr/include/assert.h:164:42: note: expanded from macro 'assert'
> 164 | ((void) sizeof (__assert_single_arg (__VA_ARGS__)), __extension__ ({ \
> | ^~~~~~~~~~~
> /usr/include/assert.h:114:40: note: method here [loplugin:pointerbool]
> 114 | extern _Bool __assert_single_arg (_Bool);
> | ~~~~~^
> engine/soltools/cpp/_tokens.c:56:12: error: implicit conversion (PointerToBoolean) of call argument from 'Token *' (aka 'struct token *') to 'bool' [loplugin:implicitboolconversion]
> 56 | assert(trp->bp); // realloc failure is OOM -> no point to handle
> | ^~~~~~~
> /usr/include/assert.h:164:42: note: expanded from macro 'assert'
> 164 | ((void) sizeof (__assert_single_arg (__VA_ARGS__)), __extension__ ({ \
> | ^~~~~~~~~~~
and
> [CPT] compilerplugins/clang/test/consttobool.cxx
> error: 'expected-error' diagnostics seen but not expected:
> Line 72: implicit conversion of constant &"msg"[0] of type 'const char *' to 'bool'; use 'true' instead [loplugin:consttobool]
> 1 error generated.
against glibc-devel-2.44-1.fc45.x86_64
[Cherry-pick note by Michael Weghorn:
clang-format was run on the files modified by this commit
to adhere to code style as mandated by the LibreOffice clang-format rules,
while the Collabora repository that this commit was cherry-picked
from doesn't check clang-format rules any more.
Based on the discussion in
https://gerrit.libreoffice.org/c/core/+/211063/comments/d368cf20_d66d1a50 ,
I'm adding myself as co-author to clarify the cherry-picked commit
contains those additional changes to the original commit by Stephan
from the Collabora main branch.]
Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I53d66f280ea82d295a2c2c086f4d02a965a893d7
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12738
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit ecce89b1fe7f0b1f09c13c46625b33443b1dadfb)
Co-authored-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211063
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
<https://github.com/llvm/llvm-project/commit/3c49576417bab1b07764aa0b22664cbc8d3c3f53>
"[ADT] Add has_value, value, value_or to llvm::Optional" is in Clang 15, and
<https://github.com/llvm/llvm-project/commit/b5f8d42efe3e246d582d4a1a328fac915e4ce8dc>
"[ADT] Deprecate Optional::{hasValue,getValue} (NFC)" is in Clang 16 trunk,
causing
> In file included from compilerplugins/clang/sharedvisitor/sharedvisitor.cxx:95:
> compilerplugins/clang/pointerbool.cxx:118:21: error: 'hasValue' is deprecated: Use has_value instead. [-Werror,-Wdeprecated-declarations]
> if (ret.hasValue() && (ret.getValue() == 1 || ret.getValue() == 0))
> ^
> ~/llvm/inst/include/llvm/ADT/Optional.h:324:5: note: 'hasValue' has been explicitly marked deprecated here
> [[deprecated("Use has_value instead.")]] constexpr bool hasValue() const {
> ^
etc.
Change-Id: I377effe29fc6752484d2870b9a0fd66fddc26bfc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137982
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
to look through template instantiations involving std::forward
motivated by
commit b1617acde1
drop RadioButton arg defaults
the nBits arg in builder.cxx was in the wrong place
Change-Id: I222ea2aeea6f44ae54839e824a247a8105392c2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109789
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
I seem to have missed quite a few in
commit 9f4d23c151
filter out some of the AST in the plugins
This nets me another 14% improvement
Change-Id: I39b980b49ced560f768045dbedd3ddfef29306c1
Reviewed-on: https://gerrit.libreoffice.org/59501
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
look for possibly bogus implicit conversions to bool when passing
(normally pointer) args to bool params.
this plugin comes in the wake of a couple of bugs caused by refactoring,
where some of the call sites were not currently updated.
Of the changes, the following are real bugs:
desktop/../dp_persmap.cxx
StartInputFieldDlg
in sw/../fldmgr.cxx
which occurred as a result of
commit 39d719a80d
Date: Tue May 3 11:39:37 2016 +0200
tdf#99529 sw: don't pop up input field dialog before inserting field
CSerializationURLEncoded::encode_and_append in
forms/../serialization_urlencoded.cxx
XclExpCFImpl::XclExpCFImpl
in sc/../xecontent.cxx
I have no idea how to properly fix this, just made a guess.
SwDocTest::test64kPageDescs
in sw/qa/core/uwriter.cxx
which looks like a simple copy/paste error.
Change-Id: I795ebd5ef485a1d36863dc27fe13832989f5a441
Reviewed-on: https://gerrit.libreoffice.org/48291
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>