summaryrefslogtreecommitdiff
path: root/winaccessibility/source/service/AccObjectManagerAgent.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-10-29 09:26:28 +0200
committerStephan Bergmann <sbergman@redhat.com>2021-10-29 13:26:12 +0200
commita5cea74034a8e029bfdf0f2b82ea8800bf5bd206 (patch)
tree9d87c2d78e9c5e16b83c445ce23ed2e0fc8df175 /winaccessibility/source/service/AccObjectManagerAgent.cxx
parent2f39a7b8f90a65d0be9894a0edcf01c161289459 (diff)
Fix misuses of NULL across Windows-only code
...which defines NULL as a plain 0 integer literal instead of the GNU __null extension, so clang-cl's -Wnull-conversion cannot kick in. These findings are from an experimental build done with clang-cl and a modified > --- a/clang/lib/Headers/stddef.h > +++ b/clang/lib/Headers/stddef.h > @@ -83,6 +83,10 @@ typedef __WCHAR_TYPE__ wchar_t; > # if !defined(__MINGW32__) && !defined(_MSC_VER) > # define NULL __null > # else > -# define NULL 0 > +# if __cplusplus >= 201103L > +# define NULL nullptr > +# else > +# define NULL 0 > +# endif > # endif > #else > # define NULL ((void*)0) However, that build also ran into lots of places where 3rd-party code in external/ and Windows system headers caused issues when NULL is nullptr (which I worked around with various hacky patches for that build), so this is unfortunately not something that can easily be enabled generally. Change-Id: I10674464498a9bc63578d9e6cc32ddde23ab4f30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124419 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'winaccessibility/source/service/AccObjectManagerAgent.cxx')
-rw-r--r--winaccessibility/source/service/AccObjectManagerAgent.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/winaccessibility/source/service/AccObjectManagerAgent.cxx b/winaccessibility/source/service/AccObjectManagerAgent.cxx
index ab909d495398..62d58f384f17 100644
--- a/winaccessibility/source/service/AccObjectManagerAgent.cxx
+++ b/winaccessibility/source/service/AccObjectManagerAgent.cxx
@@ -376,7 +376,7 @@ bool AccObjectManagerAgent::IsTopWinAcc(XAccessible* pXAcc)
{
return pWinManager->IsTopWinAcc( pXAcc );
}
- return NULL;
+ return false;
}
bool AccObjectManagerAgent::IsStateManageDescendant(XAccessible* pXAcc)