From b98b779401433a3c7146aa8f9750c64e60c46e93 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Sat, 15 Dec 2012 16:04:01 +0100 Subject: Some cppcheck cleaning in vcl Change-Id: Ie8fc421d4b9cc7340d5c634e3e2593795bf2be68 --- vcl/unx/generic/app/wmadaptor.cxx | 3 +-- vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'vcl/unx') diff --git a/vcl/unx/generic/app/wmadaptor.cxx b/vcl/unx/generic/app/wmadaptor.cxx index 78ccef7c9e7b..652d238e6340 100644 --- a/vcl/unx/generic/app/wmadaptor.cxx +++ b/vcl/unx/generic/app/wmadaptor.cxx @@ -349,12 +349,11 @@ NetWMAdaptor::NetWMAdaptor( SalDisplay* pSalDisplay ) : unsigned long nItems = 0; unsigned long nBytesLeft = 0; unsigned char* pProperty = NULL; - bool bNetWM = false; initAtoms(); // check for NetWM - bNetWM = getNetWmName(); + bool bNetWM = getNetWmName(); if( bNetWM && XGetWindowProperty( m_pDisplay, m_pSalDisplay->GetRootWindow( m_pSalDisplay->GetDefaultXScreen() ), diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx index 7d99c32e7ce8..210e50ba43fa 100644 --- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx @@ -966,7 +966,6 @@ void GtkSalGraphics::renderAreaToPix( cairo_t *cr, long ax = region->x; long ay = region->y; long awidth = region->width; - long aheight = region->height; /* Get tje cairo surface and the data */ cairo_surface_t* surface = cairo_get_target(cr); @@ -979,7 +978,7 @@ void GtkSalGraphics::renderAreaToPix( cairo_t *cr, unsigned char *src = data.get(); src += (int)ay * nStride + (int)ax * 3; awidth = MIN (region->width, size.getX() - ax); - aheight = MIN (region->height, size.getY() - ay); + long aheight = MIN (region->height, size.getY() - ay); for (int y = 0; y < aheight; ++y) { -- cgit