binaryurp/source/bridge.cxx        |    2 +-
 comphelper/source/xml/xmltools.cxx |    8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 990b9d7acce2893d355a213b9a7855b2fb6f7b90
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sat Feb 3 14:24:07 2024 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sun Feb 4 08:50:22 2024 +0100

    cid#1591493 Unchecked return value
    
    Change-Id: I0d39e142d3fd4100f68f1fff3f9d305aa1b59728
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162954
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index 2bd3bcfb2f80..068649cc3b4b 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -75,7 +75,7 @@ namespace {
 sal_Int32 random() {
     sal_Int32 n;
     rtlRandomPool pool = rtl_random_createPool();
-    rtl_random_getBytes(pool, &n, sizeof n);
+    (void)rtl_random_getBytes(pool, &n, sizeof n);
     rtl_random_destroyPool(pool);
     return n;
 }
diff --git a/comphelper/source/xml/xmltools.cxx 
b/comphelper/source/xml/xmltools.cxx
index 1b10964b1a35..6ae8fceed5b9 100644
--- a/comphelper/source/xml/xmltools.cxx
+++ b/comphelper/source/xml/xmltools.cxx
@@ -71,17 +71,21 @@ namespace
 
 namespace comphelper::xml
 {
+        // Generate some 'chaff' of varying length to be the body of an
+        // XML comment to put at the start of encrypted content to make
+        // document content a little less predictable.
+        // See SvXMLExport::addChaffWhenEncryptedStorage
         OString makeXMLChaff()
         {
             rtlRandomPool pool = rtl_random_createPool();
 
             sal_Int8 n;
-            rtl_random_getBytes(pool, &n, 1);
+            (void)rtl_random_getBytes(pool, &n, 1);
 
             sal_Int32 nLength = 1024+n;
             // coverity[tainted_data] - 1024 deliberate random minus max 
-127/plus max 128
             std::vector<sal_uInt8> aChaff(nLength);
-            rtl_random_getBytes(pool, aChaff.data(), nLength);
+            (void)rtl_random_getBytes(pool, aChaff.data(), nLength);
 
             rtl_random_destroyPool(pool);
 

Reply via email to