[gcompris] Fixed code to compile with the -Werror=unused-but-set-variable gcc new compilation flag.
- From: Bruno Coudoin <bcoudoin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcompris] Fixed code to compile with the -Werror=unused-but-set-variable gcc new compilation flag.
- Date: Mon, 14 Feb 2011 21:55:29 +0000 (UTC)
commit a3bb797255c00b876aac86f493aa2b12752ef6a5
Author: Hans de Goede <hdegoede redhat com>
Date: Sat Feb 12 22:19:50 2011 +0100
Fixed code to compile with the -Werror=unused-but-set-variable gcc new compilation flag.
src/advanced_colors-activity/advanced_colors.c | 2 --
src/algebra_by-activity/algebra.c | 3 ---
src/awele-activity/awele.c | 5 +----
src/babymatch-activity/shapegame.c | 2 +-
src/boards/goocanvas.c | 3 +--
src/boards/py-mod-admin.c | 3 +--
src/boards/py-mod-skin.c | 3 +--
src/boards/py-mod-utils.c | 3 +--
src/click_on_letter-activity/click_on_letter.c | 4 ----
src/clockgame-activity/clockgame.c | 7 +++----
src/crane-activity/crane.c | 5 ++---
src/fifteen-activity/fifteen.c | 3 +--
src/gcompris/about.c | 2 --
src/gcompris/bar.c | 9 ---------
src/gcompris/dialog.c | 5 -----
src/gcompris/file_selector.c | 18 ++----------------
src/gcompris/gameutil.c | 7 -------
src/gcompris/gcompris_confirm.c | 4 +---
src/gcompris/images_selector.c | 3 +--
src/gcompris/skin.c | 3 ---
src/gcompris/wordlist.c | 3 ---
src/goocanvas/src/goocanvasgroup.c | 4 ----
src/magic_hat_minus-activity/magic_hat.c | 6 ++----
src/money-activity/money_widget.c | 4 +++-
src/scalesboard-activity/scale.c | 9 ++++-----
src/tangram-activity/gtans.c | 17 -----------------
src/traffic-activity/traffic.c | 3 ---
src/wordsgame-activity/wordsgame.c | 4 +---
28 files changed, 26 insertions(+), 118 deletions(-)
---
diff --git a/src/advanced_colors-activity/advanced_colors.c b/src/advanced_colors-activity/advanced_colors.c
index 273e5d8..ec4e15d 100644
--- a/src/advanced_colors-activity/advanced_colors.c
+++ b/src/advanced_colors-activity/advanced_colors.c
@@ -280,7 +280,6 @@ static GooCanvasItem *colors_create_item(GooCanvasItem *parent)
{
GdkPixbuf *pixmap;
char *str = NULL;
- int i;
boardRootItem = goo_canvas_group_new (goo_canvas_get_root_item(gcomprisBoard->canvas),
NULL);
@@ -303,7 +302,6 @@ static GooCanvasItem *colors_create_item(GooCanvasItem *parent)
g_object_set (highlight_image_item,
"visibility", GOO_CANVAS_ITEM_INVISIBLE,
NULL);
- i = g_random_int_range(0,LAST_COLOR);
gdk_pixbuf_unref(pixmap);
diff --git a/src/algebra_by-activity/algebra.c b/src/algebra_by-activity/algebra.c
index df307c9..7847d1e 100644
--- a/src/algebra_by-activity/algebra.c
+++ b/src/algebra_by-activity/algebra.c
@@ -712,14 +712,11 @@ static void set_focus_item(ToBeFoundItem *toBeFoundItem, gboolean status)
static gboolean solution_found()
{
ToBeFoundItem *firstToBeFoundItem = currentToBeFoundItem;
- ToBeFoundItem *toBeFoundItem;
/* Go to the leftmost digit */
while(firstToBeFoundItem->previous!=NULL)
firstToBeFoundItem = firstToBeFoundItem->previous;
- toBeFoundItem = firstToBeFoundItem;
-
/* Check the numbers one by one */
while(firstToBeFoundItem != NULL)
{
diff --git a/src/awele-activity/awele.c b/src/awele-activity/awele.c
index d01ee92..101c374 100644
--- a/src/awele-activity/awele.c
+++ b/src/awele-activity/awele.c
@@ -715,7 +715,7 @@ updateNbBeans (int alpha)
{
char buffer[3]; //Manipulation chaines de caracteres
- int i, j, k, idxTabBeans = 0; //Compteur Boucle Manipulation Elements graphiques
+ int i, j, idxTabBeans = 0; //Compteur Boucle Manipulation Elements graphiques
static short int nbActiveBean = NBTOTALBEAN; //nbre graine restant sur plateau
static short int nbOldActiveBean; //nbre graine restant sur plateau au tour precedent
BEANHOLE_LINK *ptBeansHoleLink = NULL; //pointeur sur structures stockant les item graines et la case dans laquelle elles se trouvent.
@@ -774,9 +774,6 @@ updateNbBeans (int alpha)
j < staticAwale->board[i] && idxTabBeans < nbActiveBean;
j++, idxTabBeans++)
{
-
- k = 0 + g_random_int() % 4;
-
g_object_set (ptBeansHoleLink[idxTabBeans].beanPixbuf,
"x", (double) caseCoord[i] +
g_random_int() % 50,
diff --git a/src/babymatch-activity/shapegame.c b/src/babymatch-activity/shapegame.c
index ccbfd85..fff9f5d 100644
--- a/src/babymatch-activity/shapegame.c
+++ b/src/babymatch-activity/shapegame.c
@@ -1928,7 +1928,7 @@ config_start(GcomprisBoard *agcomprisBoard,
else
drag_previous = 0;
- gc_board_config_combo_drag(bconf, drag_mode);
+ gc_board_config_combo_drag(bconf, drag_previous);
}
diff --git a/src/boards/goocanvas.c b/src/boards/goocanvas.c
index 78af596..773ec8a 100644
--- a/src/boards/goocanvas.c
+++ b/src/boards/goocanvas.c
@@ -4452,7 +4452,6 @@ _wrap_goo_canvas_item_get_requested_area(PyGObject *self,
PyObject *kwargs)
{
static char *kwlist[] = { "cr", NULL };
- int ret;
GooCanvasBounds bounds;
PycairoContext *cr;
@@ -4461,7 +4460,7 @@ _wrap_goo_canvas_item_get_requested_area(PyGObject *self,
kwlist, &PycairoContext_Type, &cr))
return NULL;
- ret = goo_canvas_item_get_requested_area(GOO_CANVAS_ITEM(self->obj),
+ goo_canvas_item_get_requested_area(GOO_CANVAS_ITEM(self->obj),
cr->ctx, &bounds);
return pygoo_canvas_bounds_new(&bounds);
diff --git a/src/boards/py-mod-admin.c b/src/boards/py-mod-admin.c
index b391ba0..f32bed2 100644
--- a/src/boards/py-mod-admin.c
+++ b/src/boards/py-mod-admin.c
@@ -384,8 +384,7 @@ static PyMethodDef PythonGcomprisAdminModule[] = {
void python_gcompris_admin_module_init(void)
{
- PyObject* module;
- module = Py_InitModule("_gcompris_admin", PythonGcomprisAdminModule);
+ Py_InitModule("_gcompris_admin", PythonGcomprisAdminModule);
}
/* Some usefull code parts ... */
diff --git a/src/boards/py-mod-skin.c b/src/boards/py-mod-skin.c
index 0c94486..2dbebfa 100644
--- a/src/boards/py-mod-skin.c
+++ b/src/boards/py-mod-skin.c
@@ -194,8 +194,7 @@ static PyMethodDef PythonGcomprisSkinModule[] = {
void python_gc_skin_module_init(void)
{
- PyObject* module;
- module = Py_InitModule("_gcompris_skin", PythonGcomprisSkinModule);
+ Py_InitModule("_gcompris_skin", PythonGcomprisSkinModule);
}
/* Some usefull code parts ... */
diff --git a/src/boards/py-mod-utils.c b/src/boards/py-mod-utils.c
index 245dfab..8c02622 100644
--- a/src/boards/py-mod-utils.c
+++ b/src/boards/py-mod-utils.c
@@ -440,8 +440,7 @@ static PyMethodDef PythonGcomprisUtilsModule[] = {
void python_gcompris_utils_module_init(void)
{
- PyObject* module;
- module = Py_InitModule("_gcompris_utils", PythonGcomprisUtilsModule);
+ Py_InitModule("_gcompris_utils", PythonGcomprisUtilsModule);
}
/* Some usefull code parts ... */
diff --git a/src/click_on_letter-activity/click_on_letter.c b/src/click_on_letter-activity/click_on_letter.c
index 066152e..dd90943 100644
--- a/src/click_on_letter-activity/click_on_letter.c
+++ b/src/click_on_letter-activity/click_on_letter.c
@@ -529,10 +529,6 @@ item_event(GooCanvasItem *item, GooCanvasItem *target,
GdkEvent *event, gpointer data)
{
int pos = GPOINTER_TO_INT(data);
- double item_x, item_y;
- item_x = event->button.x;
- item_y = event->button.y;
- //goo_canvas_convert_to_item_space(item->parent, &item_x, &item_y);
if(board_paused)
return FALSE;
diff --git a/src/clockgame-activity/clockgame.c b/src/clockgame-activity/clockgame.c
index fa12dac..c637783 100644
--- a/src/clockgame-activity/clockgame.c
+++ b/src/clockgame-activity/clockgame.c
@@ -379,7 +379,6 @@ static void display_second(guint second)
static void
clockgame_create_item(GooCanvasItem *parent)
{
- GooCanvasItem *item;
double needle_size = clock_size;
double min_point_size = clock_size*0.05;
double hour_point_size = clock_size*0.1;
@@ -421,7 +420,7 @@ clockgame_create_item(GooCanvasItem *parent)
canvasPoints->coords[2]=cx + needle_size * sin(ang);
canvasPoints->coords[3]=cy - needle_size * cos(ang);
- item = goo_canvas_polyline_new (boardRootItem, FALSE, 2,
+ goo_canvas_polyline_new (boardRootItem, FALSE, 2,
canvasPoints->coords[0],
canvasPoints->coords[1],
canvasPoints->coords[2],
@@ -434,7 +433,7 @@ clockgame_create_item(GooCanvasItem *parent)
if(gcomprisBoard->level<5)
{
mtext = g_strdup_printf("%d", min);
- item = goo_canvas_text_new (boardRootItem,
+ goo_canvas_text_new (boardRootItem,
mtext,
(double) cx + (needle_size+10) * sin(ang),
(double) cy - (needle_size+10) * cos(ang),
@@ -451,7 +450,7 @@ clockgame_create_item(GooCanvasItem *parent)
if(min%5==0)
{
mtext = g_strdup_printf( "%d", min/5);
- item = goo_canvas_text_new (boardRootItem,
+ goo_canvas_text_new (boardRootItem,
mtext,
(double) cx + (needle_size-30) * sin(ang),
(double) cy - (needle_size-30) * cos(ang),
diff --git a/src/crane-activity/crane.c b/src/crane-activity/crane.c
index 975d9eb..c51a550 100644
--- a/src/crane-activity/crane.c
+++ b/src/crane-activity/crane.c
@@ -581,7 +581,6 @@ static void draw_redhands() {
// Draw the drak frame (horizontal and vertical lines) that helps positionning elements
static void draw_frame(int x, int y) {
- GooCanvasItem *item_frame = NULL;
int i;
GooCanvasPoints *track;
@@ -594,7 +593,7 @@ static void draw_frame(int x, int y) {
track->coords[2] = x + i * CRANE_FRAME_CELL;
track->coords[3] = y + (CRANE_FRAME_LINE * CRANE_FRAME_CELL) - CRANE_FRAME_BORDER;
- item_frame = goo_canvas_polyline_new (boardRootItem, FALSE, 0,
+ goo_canvas_polyline_new (boardRootItem, FALSE, 0,
"points", track,
"fill-color", "black",
NULL);
@@ -607,7 +606,7 @@ static void draw_frame(int x, int y) {
track->coords[2] = x + (CRANE_FRAME_COLUMN * CRANE_FRAME_CELL) - CRANE_FRAME_BORDER;
track->coords[3] = y + (i * CRANE_FRAME_CELL);
- item_frame = goo_canvas_polyline_new (boardRootItem, FALSE, 0,
+ goo_canvas_polyline_new (boardRootItem, FALSE, 0,
"points", track,
"fill-color", "black",
NULL);
diff --git a/src/fifteen-activity/fifteen.c b/src/fifteen-activity/fifteen.c
index 990a262..d8bbf7d 100644
--- a/src/fifteen-activity/fifteen.c
+++ b/src/fifteen-activity/fifteen.c
@@ -342,13 +342,12 @@ piece_event (GooCanvasItem *item,
{
GooCanvasItem **board;
GooCanvasItem *text;
- int num, pos, newpos;
+ int pos, newpos;
int x, y;
double dx = 0.0, dy = 0.0;
int move;
board = g_object_get_data (G_OBJECT (goo_canvas_item_get_parent(item)), "board");
- num = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (item), "piece_num"));
pos = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (item), "piece_pos"));
text = g_object_get_data (G_OBJECT (item), "text");
diff --git a/src/gcompris/about.c b/src/gcompris/about.c
index 392ce12..e678067 100644
--- a/src/gcompris/about.c
+++ b/src/gcompris/about.c
@@ -41,7 +41,6 @@ void gc_about_start ()
{
GdkPixbuf *pixmap = NULL;
gdouble y_start = 0;
- gdouble x_start = 0;
gint y = 0;
GooCanvasItem *item;
@@ -75,7 +74,6 @@ void gc_about_start ()
GooCanvasBounds bounds;
goo_canvas_item_get_bounds(item, &bounds);
- x_start = bounds.x1;
y_start = bounds.y1;
y = bounds.y2 - 26;
diff --git a/src/gcompris/bar.c b/src/gcompris/bar.c
index be95de2..88a9ef4 100644
--- a/src/gcompris/bar.c
+++ b/src/gcompris/bar.c
@@ -151,14 +151,9 @@ static void
bar_start (GooCanvas *theCanvas)
{
GcomprisProperties *properties = gc_prop_get();
- gint16 height;
- gint16 buttony;
- double zoom;
RsvgHandle *svg_handle;
GooCanvasBounds bounds;
- height = BARHEIGHT-2;
-
_default_y = BOARDHEIGHT - BARHEIGHT;
_default_zoom = 1.0;
@@ -174,10 +169,6 @@ bar_start (GooCanvas *theCanvas)
NULL);
SET_ITEM_LOCATION(bar_item, 0, 0);
- goo_canvas_item_get_bounds(bar_item, &bounds);
- zoom = (double)(height-BAR_GAP)/(bounds.y2 - bounds.y1);
- buttony = (height-(bounds.y2 - bounds.y1)*zoom)/2 - 20;
-
/*
* The Order in which buttons are created represents
* also the order in which they will be displayed
diff --git a/src/gcompris/dialog.c b/src/gcompris/dialog.c
index 7394f6c..d036614 100644
--- a/src/gcompris/dialog.c
+++ b/src/gcompris/dialog.c
@@ -47,9 +47,6 @@ void gc_dialog_close() {
*/
void gc_dialog(gchar *str, DialogBoxCallBack dbcb)
{
- gint y_start;
- gint x_start;
-
g_warning("Dialog=%s\n", str);
/* If we are already running do nothing */
@@ -82,8 +79,6 @@ void gc_dialog(gchar *str, DialogBoxCallBack dbcb)
GooCanvasBounds bounds;
goo_canvas_item_get_bounds(itemDialogText, &bounds);
- x_start = bounds.x1;
- y_start = bounds.y1;
goo_canvas_text_new (rootDialogItem,
str,
diff --git a/src/gcompris/file_selector.c b/src/gcompris/file_selector.c
index 63dfe91..beda7cf 100644
--- a/src/gcompris/file_selector.c
+++ b/src/gcompris/file_selector.c
@@ -161,8 +161,6 @@ display_file_selector(int the_mode,
FileSelectorCallBack iscb,
void *user_context)
{
- GooCanvasItem *item;
- gchar *name = NULL;
gchar *full_rootdir;
mode = the_mode;
@@ -179,13 +177,12 @@ display_file_selector(int the_mode,
gc_board_pause(TRUE);
- name = gcomprisBoard->name;
fileSelectorCallBack=iscb;
rootitem = goo_canvas_group_new (goo_canvas_get_root_item(gc_get_canvas()),
NULL);
- item = goo_canvas_svg_new (rootitem,
+ goo_canvas_svg_new (rootitem,
gc_skin_rsvg_get(),
"svg-id", "#FILE_SELECTOR",
"pointer-events", GOO_CANVAS_EVENTS_NONE,
@@ -197,7 +194,7 @@ display_file_selector(int the_mode,
if(mode==MODE_SAVE)
gtk_entry_set_max_length(GTK_ENTRY(widget_entry), 30);
- item = goo_canvas_widget_new (rootitem,
+ goo_canvas_widget_new (rootitem,
GTK_WIDGET(widget_entry),
control_area_x1,
control_area_y1,
@@ -281,7 +278,6 @@ static void
display_files(GooCanvasItem *root_item, gchar *rootdir)
{
GooCanvasItem *item;
- double iw, ih;
const gchar *one_dirent;
GDir *dir;
@@ -383,10 +379,6 @@ display_files(GooCanvasItem *root_item, gchar *rootdir)
gc_skin_get_color("gcompris/fileselectcol"),
NULL);
-
- iw = IMAGE_WIDTH;
- ih = IMAGE_HEIGHT;
-
/* Insert all files in a sorted list */
while((one_dirent = g_dir_read_name(dir)) != NULL)
@@ -673,11 +665,5 @@ item_event_file_selector (GooCanvasItem *item,
static void entry_enter_callback( GtkWidget *widget,
GtkWidget *entry )
{
- gchar *entry_text;
-
- if(!rootitem)
- return;
-
- entry_text = (char *)gtk_entry_get_text(GTK_ENTRY(entry));
}
diff --git a/src/gcompris/gameutil.c b/src/gcompris/gameutil.c
index b94f325..81111af 100644
--- a/src/gcompris/gameutil.c
+++ b/src/gcompris/gameutil.c
@@ -289,7 +289,6 @@ void gc_item_focus_init(GooCanvasItem *source_item,
{
GooCanvasItem *highlight_item;
GooCanvasBounds bounds;
- gboolean already_created = FALSE;
if(!target_item)
target_item = source_item;
@@ -306,7 +305,6 @@ void gc_item_focus_init(GooCanvasItem *source_item,
if(highlight_item)
{
- already_created = TRUE;
goo_canvas_item_remove(highlight_item);
}
@@ -440,7 +438,6 @@ gc_item_rotate_relative(GooCanvasItem *item, double angle)
{
double x1, x2, y1, y2;
double tx1, tx2, ty1, ty2;
- double cx, cy;
// goo_canvas_item_get_bounds( item, &x1, &y1, &x2, &y2 );
/* WARNING: Do not use goo_canvas_item_get_bounds which gives unpredictable results */
@@ -478,10 +475,6 @@ gc_item_rotate_relative(GooCanvasItem *item, double angle)
x2 = MAX(tx1,tx2);
y2 = MAX(ty1,ty2);
-
- cx = (x2+x1)/2;
- cy = (y2+y1)/2;
-
goo_canvas_item_rotate(item, angle,
x1+(x2-x1)/2,
y1+(y2-y1)/2);
diff --git a/src/gcompris/gcompris_confirm.c b/src/gcompris/gcompris_confirm.c
index 878a8be..ab1a584 100644
--- a/src/gcompris/gcompris_confirm.c
+++ b/src/gcompris/gcompris_confirm.c
@@ -153,8 +153,6 @@ display_confirm(gchar *title,
gchar *no_text,
ConfirmCallBack iscb) {
- GooCanvasItem *item;
-
if(rootitem)
return;
@@ -188,7 +186,7 @@ display_confirm(gchar *title,
rootitem = goo_canvas_group_new (goo_canvas_get_root_item(gc_get_canvas()),
NULL);
- item = goo_canvas_svg_new (rootitem,
+ goo_canvas_svg_new (rootitem,
gc_skin_rsvg_get(),
"svg-id", "#DIALOG",
"pointer-events", GOO_CANVAS_EVENTS_NONE,
diff --git a/src/gcompris/images_selector.c b/src/gcompris/images_selector.c
index 870ba39..8c38007 100644
--- a/src/gcompris/images_selector.c
+++ b/src/gcompris/images_selector.c
@@ -108,7 +108,6 @@ gc_selector_images_start (GcomprisBoard *gcomprisBoard, gchar *dataset,
void *user_context)
{
- GooCanvasItem *item;
gint y_start = 0;
gchar *dataseturl = NULL;
@@ -129,7 +128,7 @@ gc_selector_images_start (GcomprisBoard *gcomprisBoard, gchar *dataset,
images_selector_displayed = TRUE;
- item = goo_canvas_svg_new (rootitem,
+ goo_canvas_svg_new (rootitem,
gc_skin_rsvg_get(),
"svg-id", "#IMAGE_SELECTOR",
"pointer-events", GOO_CANVAS_EVENTS_NONE,
diff --git a/src/gcompris/skin.c b/src/gcompris/skin.c
index 005da63..4abe176 100644
--- a/src/gcompris/skin.c
+++ b/src/gcompris/skin.c
@@ -477,9 +477,6 @@ void
gc_skin_get_gdkcolor_default(gchar* id, guint32 def, GdkColor *gdkcolor)
{
gchar *tmp;
- guint32 color;
-
- color = gc_skin_get_color_default(id, def);
tmp = g_strdup_printf("#%06X", gc_skin_get_color(id) >> 8);
gdk_color_parse(tmp, gdkcolor);
diff --git a/src/gcompris/wordlist.c b/src/gcompris/wordlist.c
index 8c56080..ff90f7e 100644
--- a/src/gcompris/wordlist.c
+++ b/src/gcompris/wordlist.c
@@ -69,8 +69,6 @@ GcomprisWordlist
GcomprisWordlist *wordlist;
xmlChar *text;
- GSList *words = NULL;
-
if (!format)
return NULL;
@@ -161,7 +159,6 @@ GcomprisWordlist
node = wlNode->children;
while((node!=NULL)) {
- words = NULL;
if (node->type!=XML_ELEMENT_NODE){
node = node->next;
continue;
diff --git a/src/goocanvas/src/goocanvasgroup.c b/src/goocanvas/src/goocanvasgroup.c
index 0f709ac..3e05894 100644
--- a/src/goocanvas/src/goocanvasgroup.c
+++ b/src/goocanvas/src/goocanvasgroup.c
@@ -172,12 +172,10 @@ goo_canvas_group_new (GooCanvasItem *parent,
...)
{
GooCanvasItem *item;
- GooCanvasGroup *group;
va_list var_args;
const char *first_property;
item = g_object_new (GOO_TYPE_CANVAS_GROUP, NULL);
- group = (GooCanvasGroup*) item;
va_start (var_args, parent);
first_property = va_arg (var_args, char*);
@@ -894,12 +892,10 @@ goo_canvas_group_model_new (GooCanvasItemModel *parent,
...)
{
GooCanvasItemModel *model;
- GooCanvasGroupModel *gmodel;
va_list var_args;
const char *first_property;
model = g_object_new (GOO_TYPE_CANVAS_GROUP_MODEL, NULL);
- gmodel = (GooCanvasGroupModel*) model;
va_start (var_args, parent);
first_property = va_arg (var_args, char*);
diff --git a/src/magic_hat_minus-activity/magic_hat.c b/src/magic_hat_minus-activity/magic_hat.c
index 09e3b4d..1721591 100644
--- a/src/magic_hat_minus-activity/magic_hat.c
+++ b/src/magic_hat_minus-activity/magic_hat.c
@@ -437,7 +437,6 @@ static void game_won() {
// Draw a frame with empty small squares
static void draw_frame(frame *my_frame) {
- GooCanvasItem *item_frame = NULL;
int i, j;
double x = my_frame->coord_x;
double y = my_frame->coord_y;
@@ -460,7 +459,7 @@ static void draw_frame(frame *my_frame) {
track->coords[8] = x + (j * (ITEM_SIZE + SPACE_BETWEEN_ITEMS));
track->coords[9] = y + (i * (ITEM_SIZE + SPACE_BETWEEN_ITEMS));
- item_frame = goo_canvas_polyline_new (boardRootItem, FALSE, 0,
+ goo_canvas_polyline_new (boardRootItem, FALSE, 0,
"points", track,
"line-width", 1.0,
"fill-color", "#948d85",
@@ -476,7 +475,6 @@ static void draw_frame(frame *my_frame) {
// Draw the table (line)
static void draw_table() {
- GooCanvasItem *item_frame = NULL;
GooCanvasPoints *track;
track = goo_canvas_points_new(2);
@@ -486,7 +484,7 @@ static void draw_table() {
track->coords[2] = MH_HAT_X + MH_HAT_WIDTH;
track->coords[3] = MH_HAT_Y + MH_HAT_HEIGHT + 5;
- item_frame = goo_canvas_polyline_new (boardRootItem, FALSE, 0,
+ goo_canvas_polyline_new (boardRootItem, FALSE, 0,
"points", track,
"line-width", 1.0,
"fill-color", "black",
diff --git a/src/money-activity/money_widget.c b/src/money-activity/money_widget.c
index 3ab08e6..21e73f5 100644
--- a/src/money-activity/money_widget.c
+++ b/src/money-activity/money_widget.c
@@ -139,11 +139,13 @@ finalize (GtkObject *object)
static void
class_init (Money_WidgetClass *class)
{
+#if 0
GtkObjectClass *object_class;
object_class = (GtkObjectClass*) class;
- //2 object_class->destroy = finalize;
+ object_class->destroy = finalize;
+#endif
}
static void
diff --git a/src/scalesboard-activity/scale.c b/src/scalesboard-activity/scale.c
index 66d242a..b41a21a 100644
--- a/src/scalesboard-activity/scale.c
+++ b/src/scalesboard-activity/scale.c
@@ -921,7 +921,6 @@ static void
scale_next_level()
{
GdkPixbuf *pixmap, *pixmap2;
- GooCanvasItem *item, *balance;
gdouble balance_x;
gc_bar_set_level(gcomprisBoard);
@@ -949,7 +948,7 @@ scale_next_level()
NULL);
gdk_pixbuf_unref(pixmap2);
- balance = goo_canvas_image_new(boardRootItem,
+ goo_canvas_image_new(boardRootItem,
pixmap,
balance_x,
balance_left_y,
@@ -978,7 +977,7 @@ scale_next_level()
pixmap = gc_pixmap_load("scale/plateau.png");
- item = goo_canvas_image_new(group_g,
+ goo_canvas_image_new(group_g,
pixmap,
0,
PLATE_Y,
@@ -994,7 +993,7 @@ scale_next_level()
pixmap = gc_pixmap_load("scale/plateau.png");
pixmap2 = gdk_pixbuf_flip(pixmap, TRUE);
- item = goo_canvas_image_new(group_d,
+ goo_canvas_image_new(group_d,
pixmap2,
0,
PLATE_Y,
@@ -1179,7 +1178,7 @@ config_start(GcomprisBoard *agcomprisBoard,
else
drag_previous = 0;
- gc_board_config_combo_drag(bconf, drag_mode);
+ gc_board_config_combo_drag(bconf, drag_previous);
}
diff --git a/src/tangram-activity/gtans.c b/src/tangram-activity/gtans.c
index f15c2db..06cd0b1 100644
--- a/src/tangram-activity/gtans.c
+++ b/src/tangram-activity/gtans.c
@@ -1770,7 +1770,6 @@ void spesavefig (void){
void taninitstart(void){
int i;
- char* accurstr;
for (i = PXSTART; i<PXNBR+PXSTART; i++){
tabpxnam[i] = NULL;
@@ -1797,22 +1796,6 @@ void taninitstart(void){
create_mainwindow(boardRootItem);
- switch (accuracy){
- case 0:
- accurstr = "maccuracy1";
- break;
- case 2:
- accurstr = "maccuracy3";
- break;
- default :
- accurstr = "maccuracy2";
- }
-
- if (rotstepnbr==TOUR/256)
- accurstr = "mrotcont";
- else
- accurstr = "mrotstp";
-
tanloadfigtab(figfilename);
}
diff --git a/src/traffic-activity/traffic.c b/src/traffic-activity/traffic.c
index 1a46ebd..0501c98 100644
--- a/src/traffic-activity/traffic.c
+++ b/src/traffic-activity/traffic.c
@@ -610,12 +610,9 @@ on_button_release (GooCanvasItem *item,
GdkEventButton *event,
car *thiscar)
{
- GooCanvas *canvas;
double item_x, item_y;
GdkCursor *cursor;
- canvas = goo_canvas_item_get_canvas (item);
-
item_x = event->x;
item_y = event->y;
goo_canvas_convert_to_item_space(goo_canvas_item_get_canvas(item),
diff --git a/src/wordsgame-activity/wordsgame.c b/src/wordsgame-activity/wordsgame.c
index af5e553..856658a 100644
--- a/src/wordsgame-activity/wordsgame.c
+++ b/src/wordsgame-activity/wordsgame.c
@@ -613,7 +613,6 @@ static void wordsgame_destroy_all_items()
static GooCanvasItem *wordsgame_create_item(GooCanvasItem *parent)
{
- GooCanvasItem *item2;
LettersItem *item;
gchar *word = gc_wordlist_random_word_get(gc_wordlist, gcomprisBoard->level);
GtkAnchorType direction_anchor = GTK_ANCHOR_NW;
@@ -646,8 +645,7 @@ static GooCanvasItem *wordsgame_create_item(GooCanvasItem *parent)
/* To 'erase' words, I create 2 times the text item. One is empty now */
/* It will be filled each time the user enters the right key */
- item2 = \
- goo_canvas_text_new (item->rootitem,
+ goo_canvas_text_new (item->rootitem,
item->word,
(double) 0,
(double) 0,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]