gnome-games r8654 - in trunk: gnibbles gnobots2 gtali mahjongg
- From: thomashpa svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r8654 - in trunk: gnibbles gnobots2 gtali mahjongg
- Date: Tue, 3 Feb 2009 21:46:54 +0000 (UTC)
Author: thomashpa
Date: Tue Feb 3 21:46:54 2009
New Revision: 8654
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8654&view=rev
Log:
Fix warnings from -Wdeclaration-after-statement
Modified:
trunk/gnibbles/worm.c
trunk/gnobots2/keyboard.c
trunk/gtali/computer.c
trunk/gtali/gyahtzee.c
trunk/mahjongg/mahjongg.c
Modified: trunk/gnibbles/worm.c
==============================================================================
--- trunk/gnibbles/worm.c (original)
+++ trunk/gnibbles/worm.c Tue Feb 3 21:46:54 2009
@@ -141,20 +141,18 @@
gnibbles_worm_handle_keypress (GnibblesWorm * worm, guint keyval)
{
GnibblesWormProps *props;
-
+ guint propsUp, propsLeft, propsDown, propsRight, keyvalUpper;
/* if (worm->keypress) {
gnibbles_worm_queue_keypress (worm, keyval);
return FALSE;
} */
-
-
props = properties->wormprops[ggz_network_mode ? 0 : worm->number];
- guint propsUp = toupper(props->up);
- guint propsLeft = toupper(props->left);
- guint propsDown = toupper(props->down);
- guint propsRight = toupper(props->right);
- guint keyvalUpper = toupper(keyval);
+ propsUp = toupper(props->up);
+ propsLeft = toupper(props->left);
+ propsDown = toupper(props->down);
+ propsRight = toupper(props->right);
+ keyvalUpper = toupper(keyval);
if (properties->wormprops[worm->number]->relmove) {
if (keyvalUpper == propsLeft)
Modified: trunk/gnobots2/keyboard.c
==============================================================================
--- trunk/gnobots2/keyboard.c (original)
+++ trunk/gnobots2/keyboard.c Tue Feb 3 21:46:54 2009
@@ -80,7 +80,7 @@
gint
keyboard_cb (GtkWidget * widget, GdkEventKey * event, gpointer data)
{
- gint i;
+ gint i, keyval;
/* This is a bit of a kludge to let through accelerator keys, otherwise
* if N is used as a key, then Ctrl-N is never picked up. The cleaner
@@ -89,7 +89,7 @@
if (event->state & (GDK_CONTROL_MASK | GDK_MOD1_MASK))
return FALSE;
- gint keyval = toupper(event->keyval);
+ keyval = toupper(event->keyval);
for (i = 0; i < 12; ++i) {
if (keyval == toupper(control_keys[i])) {
Modified: trunk/gtali/computer.c
==============================================================================
--- trunk/gtali/computer.c (original)
+++ trunk/gtali/computer.c Tue Feb 3 21:46:54 2009
@@ -173,8 +173,8 @@
bestv = -99;
{
double avg_score[num_options];
- memset(avg_score, 0, sizeof(avg_score));
DiceInfo sav_DiceValues[NUMBER_OF_DICE];
+ memset(avg_score, 0, sizeof(avg_score));
memcpy(sav_DiceValues, DiceValues, sizeof(sav_DiceValues));
for (ii = 0; ii < num_options; ii++) {
Modified: trunk/gtali/gyahtzee.c
==============================================================================
--- trunk/gtali/gyahtzee.c (original)
+++ trunk/gtali/gyahtzee.c Tue Feb 3 21:46:54 2009
@@ -906,10 +906,10 @@
game_type = game_type_from_string(game_type_string);
g_message("In test computer play section - Using %d trials for simulation", NUM_TRIALS);
for (ii = 0; ii < test_computer_play; ii++) {
+ int num_rolls = 0;
NumberOfHumans = 0;
NumberOfComputers = 1;
NewGame ();
- int num_rolls = 0;
while (!GameIsOver() && num_rolls < 100) {
ComputerRolling (CurrentPlayer);
Modified: trunk/mahjongg/mahjongg.c
==============================================================================
--- trunk/mahjongg/mahjongg.c (original)
+++ trunk/mahjongg/mahjongg.c Tue Feb 3 21:46:54 2009
@@ -523,6 +523,7 @@
DIR *dir;
gint itemno = 0;
const char *dname = NULL;
+ gchar **tileset_name;
if (tileset_list) {
g_list_foreach (tileset_list, (GFunc) g_free, NULL);
@@ -550,9 +551,7 @@
continue;
}
- // TODO: Strip off suffix (bug #406856)
-
- gchar** tileset_name = g_strsplit (s, ".", -1);
+ tileset_name = g_strsplit (s, ".", -1);
gtk_combo_box_append_text (GTK_COMBO_BOX (menu), tileset_name[0]);
g_strfreev (tileset_name);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]