diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-04-30 10:09:48 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-04-30 13:39:50 +0200 |
commit | 51407b6f8ddd0930bf338e04b2e823b93166f2f6 (patch) | |
tree | 8ab6b67448253210406c30c9d0ab142276ee4709 /unoidl | |
parent | 9fe1b7c53df5cb3a612ab30866437ced0a406fd0 (diff) |
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.mcnamara@collabora.com>
Diffstat (limited to 'unoidl')
-rw-r--r-- | unoidl/source/unoidl-check.cxx | 1 | ||||
-rw-r--r-- | unoidl/source/unoidl-write.cxx | 1 |
2 files changed, 2 insertions, 0 deletions
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; |