diff options
author | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-05-05 17:10:37 +0200 |
---|---|---|
committer | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-05-05 21:07:44 +0200 |
commit | 8c49dab215ed012fea195ea71cea079ddaa97ba3 (patch) | |
tree | f66c466504d22f2555be5b5703f2be31e535bd2b | |
parent | c44be10034e66569e1db8f9dc52918caf4f9cb6a (diff) |
Avoid loplugin:casttovoid with recent Clang 19 trunk
> In file included from sc/source/core/data/autonamecache.cxx:23:
> In file included from sc/inc/dociter.hxx:23:
> In file included from sc/inc/formulagroup.hxx:17:
> sc/inc/stlalgorithm.hxx:52:9: error: unnecessary cast to void [loplugin:casttovoid]
> 52 | (void)p; // avoid bogus MSVC '12 "unreferenced formal parameter" warning
> | ^~~~~~~
> sc/inc/stlalgorithm.hxx:51:9: note: first consumption is here [loplugin:casttovoid]
> 51 | p->~value_type();
> | ^
Change-Id: I14bcc32fcaf3026a9c3c36e522b1e61da15f224f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167158
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
-rw-r--r-- | sc/inc/stlalgorithm.hxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sc/inc/stlalgorithm.hxx b/sc/inc/stlalgorithm.hxx index f2143b9a84c7..fe3244148618 100644 --- a/sc/inc/stlalgorithm.hxx +++ b/sc/inc/stlalgorithm.hxx @@ -49,7 +49,9 @@ public: static void destroy(T* p) { p->~value_type(); +#if defined _MSC_VER (void)p; // avoid bogus MSVC '12 "unreferenced formal parameter" warning +#endif } static size_type max_size() |