diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2021-05-18 12:55:57 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2021-05-18 14:39:18 +0200 |
commit | 46c71f04c9e1fa9d257c26dd8a8f5e99bbbb1575 (patch) | |
tree | e2e1e9eeed6d51495792e83a724cc60db7228104 /canvas | |
parent | 329cc83324f8f361a5383bf7dac2c9c21799dcdc (diff) |
Drop assert checking address of reference is not nullptr
It was introduced in
commit 9090dc1f3b27195f5defd35586ac79357992be21
Date: Mon Jan 18 18:27:19 2021 +0200
split OutputDevice from Window
and caused my GCC 10 '--enable-werror' build to fail with
In file included from /usr/include/c++/10/cassert:44,
from .../include/tools/ref.hxx:23,
from .../include/vcl/outdev.hxx:24,
from .../canvas/source/vcl/impltools.hxx:25,
from .../canvas/source/vcl/canvas.hxx:39,
from .../canvas/source/vcl/canvas.cxx:22:
.../canvas/source/vcl/outdevholder.hxx: In constructor ‘vclcanvas::OutDevHolder::OutDevHolder(OutputDevice&)’:
.../canvas/source/vcl/outdevholder.hxx:38:16: error: the compiler can assume that the address of ‘rOutDev’ will never be NULL [-Werror=address]
38 | assert(&rOutDev);
| ^~~~~~~~
cc1plus: all warnings being treated as errors
make[1]: *** [.../solenv/gbuild/LinkTarget.mk:301: /home/michi/development/git/libreoffice/workdir/CxxObject/canvas/source/vcl/canvas.o] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from .../include/comphelper/solarmutex.hxx:25,
from .../include/vcl/svapp.hxx:29,
from .../canvas/source/vcl/impltools.hxx:24,
from .../canvas/source/vcl/spritecanvas.hxx:44,
from .../canvas/source/vcl/spritecanvas.cxx:28:
.../canvas/source/vcl/outdevholder.hxx: In constructor ‘vclcanvas::OutDevHolder::OutDevHolder(OutputDevice&)’:
.../canvas/source/vcl/outdevholder.hxx:38:16: error: the compiler can assume that the address of ‘rOutDev’ will never be NULL [-Werror=address]
38 | assert(&rOutDev);
Change-Id: I9e8ef7e91dba847f4894124348f13755fc620fac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115737
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'canvas')
-rw-r--r-- | canvas/source/vcl/outdevholder.hxx | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/canvas/source/vcl/outdevholder.hxx b/canvas/source/vcl/outdevholder.hxx index 28dfd4317fe0..78f3badf8bb6 100644 --- a/canvas/source/vcl/outdevholder.hxx +++ b/canvas/source/vcl/outdevholder.hxx @@ -35,7 +35,6 @@ public: explicit OutDevHolder(OutputDevice& rOutDev) : mrOutDev(rOutDev) { - assert(&rOutDev); } private: |