From 493e37d16ce673560ab4309f91308cd5a99944d1 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Sun, 16 Mar 2025 22:30:35 +0100 Subject: [PATCH] Avoid -Werror,-Wnull-dereference Change-Id: Ibfc0111a61817b7cf8c5b60d3f9563fd3cf05c5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183011 Reviewed-by: Stephan Bergmann Tested-by: Jenkins --- desktop/test/deployment/crashextension/crashextension.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/desktop/test/deployment/crashextension/crashextension.cxx b/desktop/test/deployment/crashextension/crashextension.cxx index 2e64f3af024b..18ca83e6066c 100644 --- a/desktop/test/deployment/crashextension/crashextension.cxx +++ b/desktop/test/deployment/crashextension/crashextension.cxx @@ -127,7 +127,8 @@ Provider::queryDispatches(css::uno::Sequence con void Provider::dispatch(css::util::URL const&, css::uno::Sequence const&) { // Crash LibreOffice - *((char*)NULL) = 0; + char volatile* p = nullptr; + *p = 0; } cppu::ImplementationEntry const services[]