summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2012-10-20 20:25:57 +0200
committerJulien Nabet <serval2412@yahoo.fr>2012-10-21 12:10:11 +0200
commit0a2eb9cfd667c1f3186cdeb9f7375aad81c66c0e (patch)
tree21aa62fd61d2b79f6fff6609277a680fd7dbe9ab /vcl/unx/gtk
parentde6b1a30995c206a186231e5f6fe849c19f1c765 (diff)
Fix some Variable "X" is reassigned a value before the old one has been used
Change-Id: I2fbdf26441f64183676035692391e65db0efe069
Diffstat (limited to 'vcl/unx/gtk')
-rw-r--r--vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx3
-rw-r--r--vcl/unx/gtk/window/gtkframe.cxx6
2 files changed, 3 insertions, 6 deletions
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 8c603ed187cf..4985c43dfa06 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -4025,13 +4025,12 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
aStyleSet.SetToolbarIconSize( STYLE_TOOLBAR_ICONSIZE_LARGE );
- const cairo_font_options_t* pNewOptions = NULL;
#if !GTK_CHECK_VERSION(2,9,0)
static cairo_font_options_t* (*gdk_screen_get_font_options)(GdkScreen*) =
(cairo_font_options_t*(*)(GdkScreen*))osl_getAsciiFunctionSymbol( GetSalData()->m_pPlugin, "gdk_screen_get_font_options" );
if( gdk_screen_get_font_options != NULL )
#endif
- pNewOptions = gdk_screen_get_font_options( pScreen );
+ const cairo_font_options_t* pNewOptions = gdk_screen_get_font_options( pScreen );
aStyleSet.SetCairoFontOptions( pNewOptions );
// finally update the collected settings
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index d749b6dce96f..1d65ffb03918 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -1853,8 +1853,7 @@ void GtkSalFrame::SetScreen( unsigned int nNewScreen, int eType, Rectangle *pSiz
return;
gint nMonitor;
- GdkScreen *pScreen = NULL;
- pScreen = getDisplay()->getSystem()->getScreenMonitorFromIdx( nNewScreen, nMonitor );
+ GdkScreen *pScreen = getDisplay()->getSystem()->getScreenMonitorFromIdx( nNewScreen, nMonitor );
// Heavy lifting, need to move screen ...
if( pScreen != gtk_widget_get_screen( m_pWindow ))
@@ -2047,10 +2046,9 @@ dbus_inhibit_gsm (const gchar *appname,
guint cookie;
GError *error = NULL;
DBusGProxy *proxy = NULL;
- DBusGConnection *session_connection = NULL;
/* get the DBUS session connection */
- session_connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
+ DBusGConnection *session_connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
if (error != NULL) {
g_debug ("DBUS cannot connect : %s", error->message);
g_error_free (error);