Date: prev next · Thread: first prev next last
2020 Archives by date, by thread · List index


I guess we'll need to look for a better approach to get rid of those annoying Coverity "uncaught exception" warnings (of the category, "mechanical static analysis may conclude that this can happen, but human analysis concludes that this cannot happen; and if it did, we are screwed anyway"---i.e., akin to a "this cannot happen" assert(false) placed in the code). std::make_shared does have benefit over plain operator new (potentially bundling the object and the control block in a single allocation).

On 24/04/2020 11:30, Caolán McNamara (via logerrit) wrote:
  vcl/source/gdi/impgraph.cxx |    3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit b21d2fde299031708adba8ee652e2734287e83a8
Author:     Caolán McNamara <caolanm@redhat.com>
AuthorDate: Thu Apr 23 20:25:06 2020 +0100
Commit:     Caolán McNamara <caolanm@redhat.com>
CommitDate: Fri Apr 24 11:30:14 2020 +0200

     cid#1455212 Uncaught exception
Change-Id: I555a288de1da8de85fde03a90a31cab48ff060cc
     Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92826
     Tested-by: Jenkins
     Reviewed-by: Caolán McNamara <caolanm@redhat.com>

diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 9deb69a836e4..dd4f2cdebd58 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -21,6 +21,7 @@
  #include <sal/log.hxx>
#include <comphelper/fileformat.h>
+#include <o3tl/deleter.hxx>
  #include <tools/fract.hxx>
  #include <tools/vcompat.hxx>
  #include <tools/urlobj.hxx>
@@ -1328,7 +1329,7 @@ bool ImpGraphic::ImplSwapOut()
      bool bRet = ImplSwapOut( xOStm.get() );
      if( bRet )
      {
-        mpSwapFile = std::make_shared<ImpSwapFile>();
+        mpSwapFile.reset(new ImpSwapFile, o3tl::default_delete<ImpSwapFile>());
          mpSwapFile->aSwapURL = aTmpURL;
          mpSwapFile->maOriginURL = getOriginURL();
      }


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.