unoidl/source/unoidl-check.cxx | 1 + unoidl/source/unoidl-write.cxx | 1 + 2 files changed, 2 insertions(+)
New commits: commit 51407b6f8ddd0930bf338e04b2e823b93166f2f6 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Tue Apr 30 10:09:48 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Tue Apr 30 13:39:50 2024 +0200 WaE: C6011 Dereferencing NULL pointer warnings add some asserts for msvc Change-Id: I3b024b9c1a3160a963ba77ad7313767f2c0a29ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166920 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/unoidl/source/unoidl-check.cxx b/unoidl/source/unoidl-check.cxx index cfd691a2f2e9..b2d57766f968 100644 --- a/unoidl/source/unoidl-check.cxx +++ b/unoidl/source/unoidl-check.cxx @@ -106,6 +106,7 @@ bool getArgument( if (delimiter == nullptr) { badUsage(); } + assert(delimiter && "badUsage exits otherwise"); *delimiter = true; return false; } diff --git a/unoidl/source/unoidl-write.cxx b/unoidl/source/unoidl-write.cxx index 39a16f6c116c..e04fa16473a5 100644 --- a/unoidl/source/unoidl-write.cxx +++ b/unoidl/source/unoidl-write.cxx @@ -62,6 +62,7 @@ OUString getArgumentUri(sal_uInt32 argument, bool * entities) { if (entities == nullptr) { badUsage(); } + assert(entities && "badUsage exits otherwise"); *entities = true; } else if (entities != nullptr) { *entities = false;