aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJussi Kukkonen <jussi.kukkonen@intel.com>2016-11-11 16:28:57 +0200
committerJussi Kukkonen <jussi.kukkonen@intel.com>2016-11-11 20:54:49 +0200
commit8bb36e3c82860f1a06c5ddef73bba99fe2f44ae9 (patch)
tree5695ab66bd852f2354f62a24fdc50864bc14f5af
parent4945190005750757e428922731b6b29585d0bd06 (diff)
downloadmatchbox-window-manager-8bb36e3c82860f1a06c5ddef73bba99fe2f44ae9.tar.gz
matchbox-window-manager-8bb36e3c82860f1a06c5ddef73bba99fe2f44ae9.tar.bz2
matchbox-window-manager-8bb36e3c82860f1a06c5ddef73bba99fe2f44ae9.zip
Fix "unused variable" warnings
Some were removed as unused, some just silenced with the gcc attribute since they were actually somehow used and fixing otherwise would have been more invasive. Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-rw-r--r--src/ewmh.c6
-rw-r--r--src/mbtheme.c7
-rw-r--r--src/wm.c2
3 files changed, 5 insertions, 10 deletions
diff --git a/src/ewmh.c b/src/ewmh.c
index 17ea48a..afcabe7 100644
--- a/src/ewmh.c
+++ b/src/ewmh.c
@@ -1257,8 +1257,9 @@ int
ewmh_utf8_len(unsigned char *str) /* Only parse _validated_ utf8 */
{
unsigned char *p = str;
+ int len, result = 0;
+ __attribute__((unused)) int mask;
- int mask, len, result = 0;
while (*p != '\0')
{
UTF8_COMPUTE(*p, mask, len);
@@ -1273,8 +1274,9 @@ int
ewmh_utf8_get_byte_cnt(unsigned char *str, int num_chars)
{
unsigned char *p = str;
+ int len, result = 0;
+ __attribute__((unused)) int mask;
- int mask, len, result = 0;
while (*p != '\0' && num_chars-- > 0)
{
UTF8_COMPUTE(*p, mask, len);
diff --git a/src/mbtheme.c b/src/mbtheme.c
index 42459a0..821195a 100644
--- a/src/mbtheme.c
+++ b/src/mbtheme.c
@@ -602,7 +602,6 @@ theme_frame_paint( MBTheme *theme,
MBThemeFrame *frame;
MBPixbufImage *img;
MBThemeLayer *layer_label = NULL, *layer_icon = NULL;
- struct list_item *layer_list_item;
int label_rendered_width;
int decor_idx = 0;
MBDrawable *drawable = NULL;
@@ -699,8 +698,6 @@ theme_frame_paint( MBTheme *theme,
img = theme->img_caches[frame_type];
}
- layer_list_item = frame->layers;
-
layer_label = (MBThemeLayer*)list_find_by_id(frame->layers, LAYER_LABEL);
/* Figure out text alignment + positioning */
@@ -981,7 +978,6 @@ theme_frame_menu_highlight_entry(Client *c,
MBDrawable *drw;
MBThemeFrame *frame;
MBFont *font;
- MBColor *color;
Client *entry = (Client *)button->data;
int offset, item_h;
@@ -991,7 +987,6 @@ theme_frame_menu_highlight_entry(Client *c,
return;
font = frame->font;
- color = frame->color;
if (frame->hl_color)
{
@@ -1982,7 +1977,6 @@ parse_color_tag (MBTheme *theme,
XMLNode *node)
{
MBColor *color = NULL;
- int alpha;
char *id = get_attr(node, "id");
char *spec = get_attr(node, "def");
@@ -1990,7 +1984,6 @@ parse_color_tag (MBTheme *theme,
{
fprintf(stderr, "matchbox *warning*: alpha attribute in theme.xml color tar is depreciated\n Use def='rrggbbaa' format instead to specify alpha\n");
}
- else alpha = 0xff;
dbg("%s() id : %s , def : %s\n", __func__, id, spec);
diff --git a/src/wm.c b/src/wm.c
index cb033c6..0823fef 100644
--- a/src/wm.c
+++ b/src/wm.c
@@ -2621,7 +2621,7 @@ wm_activate_client(Client *c)
/* As matchbox works around 'main' windows ( apps/main and desktop wins).
We need to sync extra stuff up when displaying a new one.
*/
- Bool switching_from_to_fullscreen = False;
+ __attribute__((unused)) Bool switching_from_to_fullscreen = False;
/* save focus state for transient dialogs of prev showing main win */