[Libreoffice-commits] core.git: compilerplugins/clang extensions/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Mon Oct 26 10:40:28 UTC 2020


 compilerplugins/clang/toolslong.cxx           |    3 ++-
 extensions/source/update/ui/updatecheckui.cxx |    6 +++---
 2 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit a9266c39cc71c6f23bfcad4ff6d33ccac53b5e52
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Oct 26 09:35:27 2020 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon Oct 26 11:39:45 2020 +0100

    loplugin:toolslong (--enable-online-update)
    
    ...but where
    
    > ~/lo/core/extensions/source/update/check/download.cxx:297:17: error: VarDecl, use "tools::Long" instead of 'long' [loplugin:toolslong]
    >                 long nError;
    >                 ^~~~~~~~~~~
    > ~/lo/core/extensions/source/update/check/download.cxx:153:9: error: VarDecl, use "tools::Long" instead of 'long' [loplugin:toolslong]
    >         long nCode;
    >         ^~~~~~~~~~
    
    were false positives (the third argument to
    
      curl_easy_getinfo(..., CURLINFO_RESPONSE_CODE, ...)
    
    must be a pointer to long).
    
    Change-Id: I9596ff32c32fddc7c1240d7fec3672d36265631a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104794
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/compilerplugins/clang/toolslong.cxx b/compilerplugins/clang/toolslong.cxx
index 1e808cf9daab..1f55fb76d1d6 100644
--- a/compilerplugins/clang/toolslong.cxx
+++ b/compilerplugins/clang/toolslong.cxx
@@ -123,7 +123,8 @@ void ToolsLong::run()
 
     StringRef fn(handler.getMainFileName());
     // sberg says this is fine
-    if (loplugin::isSamePathname(fn, SRCDIR "/pyuno/source/module/pyuno.cxx"))
+    if (loplugin::isSamePathname(fn, SRCDIR "/extensions/source/update/check/download.cxx")
+        || loplugin::isSamePathname(fn, SRCDIR "/pyuno/source/module/pyuno.cxx"))
         return;
 
     TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
diff --git a/extensions/source/update/ui/updatecheckui.cxx b/extensions/source/update/ui/updatecheckui.cxx
index 2ec81804cf71..4d4676113f2c 100644
--- a/extensions/source/update/ui/updatecheckui.cxx
+++ b/extensions/source/update/ui/updatecheckui.cxx
@@ -88,7 +88,7 @@ class BubbleWindow : public FloatingWindow
     Size            maMaxTextSize;
     tools::Rectangle       maTitleRect;
     tools::Rectangle       maTextRect;
-    long            mnTipOffset;
+    tools::Long     mnTipOffset;
 
 private:
     void            RecalcTextRects();
@@ -711,7 +711,7 @@ void BubbleWindow::Resize()
     tools::Rectangle aRect( 0, TIP_HEIGHT, aSize.Width(), aSize.Height() - TIP_HEIGHT );
     maRectPoly = tools::Polygon( aRect, 6, 6 );
     vcl::Region aRegion( maRectPoly );
-    long nTipOffset = aSize.Width() - TIP_RIGHT_OFFSET + mnTipOffset;
+    tools::Long nTipOffset = aSize.Width() - TIP_RIGHT_OFFSET + mnTipOffset;
 
     Point aPointArr[4];
     aPointArr[0] = Point( nTipOffset, TIP_HEIGHT );
@@ -751,7 +751,7 @@ void BubbleWindow::Paint(vcl::RenderContext& /*rRenderContext*/, const tools::Re
 
     Color aOldLine = GetLineColor();
     Size aSize = GetSizePixel();
-    long nTipOffset = aSize.Width() - TIP_RIGHT_OFFSET + mnTipOffset;
+    tools::Long nTipOffset = aSize.Width() - TIP_RIGHT_OFFSET + mnTipOffset;
 
     SetLineColor( GetSettings().GetStyleSettings().GetHelpColor() );
     DrawLine( Point( nTipOffset+2, TIP_HEIGHT ),


More information about the Libreoffice-commits mailing list