[Xfce4-commits] <xfce4-panel:master> Fix some compiler warnings.
Nick Schermer
noreply at xfce.org
Tue Dec 28 17:02:01 CET 2010
Updating branch refs/heads/master
to a2b94844ad4132af5e883f93c74c6ad242e2f9b0 (commit)
from 82bbb2b7ca6348d6e3b5ef14cd653f9383f7f298 (commit)
commit a2b94844ad4132af5e883f93c74c6ad242e2f9b0
Author: Nick Schermer <nick at xfce.org>
Date: Tue Dec 28 17:01:17 2010 +0100
Fix some compiler warnings.
plugins/clock/clock.c | 1 +
plugins/pager/pager-buttons.c | 12 ++++++++----
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/plugins/clock/clock.c b/plugins/clock/clock.c
index a21ec57..375ad47 100644
--- a/plugins/clock/clock.c
+++ b/plugins/clock/clock.c
@@ -488,6 +488,7 @@ clock_plugin_size_changed (XfcePanelPlugin *panel_plugin,
else
{
ratio_size = -1;
+ offset = 0;
}
/* set the clock size */
diff --git a/plugins/pager/pager-buttons.c b/plugins/pager/pager-buttons.c
index 45fe38a..7dfc9aa 100644
--- a/plugins/pager/pager-buttons.c
+++ b/plugins/pager/pager-buttons.c
@@ -280,14 +280,14 @@ pager_buttons_rebuild_idle (gpointer user_data)
gint rows, cols;
gint row, col;
GtkWidget *button;
- WnckWorkspace *workspace;
+ WnckWorkspace *workspace = NULL;
GtkWidget *panel_plugin;
GtkWidget *label;
- gint workspace_width, workspace_height;
- gint screen_width, screen_height;
+ gint workspace_width, workspace_height = 0;
+ gint screen_width = 0, screen_height = 0;
gint viewport_x, viewport_y;
gboolean viewport_mode = FALSE;
- gint n_viewports;
+ gint n_viewports = 0;
gint *vp_info;
gchar text[8];
@@ -335,10 +335,14 @@ pager_buttons_rebuild_idle (gpointer user_data)
{
g_warning ("only viewports with equally distributed screens are supported: %dx%d & %dx%d",
workspace_width, workspace_height, screen_width, screen_height);
+
+ goto workspace_layout;
}
}
else
{
+ workspace_layout:
+
rows = CLAMP (1, pager->rows, n_workspaces);
cols = n_workspaces / rows;
if (cols * rows < n_workspaces)
More information about the Xfce4-commits
mailing list