summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-10-26 09:35:27 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-10-26 11:39:45 +0100
commita9266c39cc71c6f23bfcad4ff6d33ccac53b5e52 (patch)
tree430977c299e4555585722a825f4d2966bc4930b4
parent6a10ea009ef590ac13d01d19fbfbc28c916ef1d4 (diff)
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@redhat.com>
-rw-r--r--compilerplugins/clang/toolslong.cxx3
-rw-r--r--extensions/source/update/ui/updatecheckui.cxx6
2 files changed, 5 insertions, 4 deletions
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 ),