Skip to content

Commit 294aba7

Browse files
committed
pinpoint: Fix some compiler warnings
There were a few unused variables and missing return values that were causing compiler warnings with -Wall
1 parent 9401b2c commit 294aba7

File tree

3 files changed

+6
-15
lines changed

3 files changed

+6
-15
lines changed

pinpoint/pinpoint.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,6 @@ typedef struct
3939
int value;
4040
} EnumDescription;
4141

42-
static EnumDescription PPBackgroundScale_desc[] =
43-
{
44-
{ "fit", PP_BG_FIT },
45-
{ "fill", PP_BG_FILL},
46-
{ NULL, 0}
47-
};
48-
4942
static EnumDescription PPTextAlign_desc[] =
5043
{
5144
{ "left", PP_TEXT_LEFT },

pinpoint/pp-cairo.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,6 @@ static void
308308
_cairo_render_text (CairoRenderer *renderer,
309309
PinPointPoint *point)
310310
{
311-
CairoPointData *data = point->data;
312311
PangoLayout *layout;
313312
PangoFontDescription *desc;
314313
PangoRectangle logical_rect = { 0, };

pinpoint/pp-clutter.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include <dax/dax.h>
3232
#include "pp-super-aa.h"
3333
#endif
34+
#include <stdlib.h>
3435

3536
/* #define QUICK_ACCESS_LEFT - uncomment to move speed access from top to left,
3637
* useful on meego netbook
@@ -256,7 +257,7 @@ static gboolean stage_motion (ClutterActor *actor,
256257
hide_cursor = g_timeout_add (500, hide_cursor_cb, actor);
257258

258259
if (!pp_get_fullscreen (CLUTTER_STAGE (actor)))
259-
return;
260+
return FALSE;
260261

261262
clutter_actor_get_size (CLUTTER_RENDERER (renderer)->stage, &stage_width, &stage_height);
262263
#ifdef QUICK_ACCESS_LEFT
@@ -275,6 +276,8 @@ static gboolean stage_motion (ClutterActor *actor,
275276
pp_slidep = g_list_nth (pp_slides, g_list_length (pp_slides) * d);
276277
show_slide (renderer, FALSE);
277278
}
279+
280+
return FALSE;
278281
}
279282

280283
static void
@@ -647,8 +650,6 @@ static void state_completed (ClutterState *state, gpointer user_data)
647650
}
648651
}
649652

650-
static gboolean in_stage_resize = FALSE;
651-
652653
static void
653654
action_slide (ClutterRenderer *renderer)
654655
{
@@ -677,7 +678,6 @@ action_slide (ClutterRenderer *renderer)
677678

678679
static gchar *pp_lookup_transition (const gchar *transition)
679680
{
680-
gchar *ret = NULL;
681681
int i;
682682
gchar *dirs[] ={ "", "./transitions/", PKGDATADIR, NULL};
683683
for (i = 0; dirs[i]; i++)
@@ -694,7 +694,7 @@ static gchar *pp_lookup_transition (const gchar *transition)
694694
static void update_commandline_shading (ClutterRenderer *renderer)
695695
{
696696
ClutterColor color;
697-
float text_x, text_y, text_width, text_height, text_scale;
697+
float text_x, text_y, text_width, text_height;
698698
float shading_x, shading_y, shading_width, shading_height;
699699
const char *command;
700700
PinPointPoint *point;
@@ -987,8 +987,7 @@ show_slide (ClutterRenderer *renderer, gboolean backwards)
987987

988988
/* render potentially executed commands */
989989
{
990-
float text_x, text_y, text_width, text_height, text_scale;
991-
float shading_x, shading_y, shading_width, shading_height;
990+
float text_x, text_y, text_width, text_height;
992991

993992
clutter_color_from_string (&color, point->text_color);
994993
g_object_set (renderer->commandline,

0 commit comments

Comments
 (0)