diff options
author | wens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-06-12 22:59:04 +0800 |
---|---|---|
committer | wens <wens@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-06-12 22:59:04 +0800 |
commit | 1dc564bc0c0626e0491012c32b5e11c7e677a6f8 (patch) | |
tree | 81a745b1b6e427bd4ca53c378c943b660b19f955 /mbbsd/gomo.c | |
parent | fcd5c94f7170a7b0fd2622eac9bf13d07a09e530 (diff) | |
download | pttbbs-1dc564bc0c0626e0491012c32b5e11c7e677a6f8.tar pttbbs-1dc564bc0c0626e0491012c32b5e11c7e677a6f8.tar.gz pttbbs-1dc564bc0c0626e0491012c32b5e11c7e677a6f8.tar.bz2 pttbbs-1dc564bc0c0626e0491012c32b5e11c7e677a6f8.tar.lz pttbbs-1dc564bc0c0626e0491012c32b5e11c7e677a6f8.tar.xz pttbbs-1dc564bc0c0626e0491012c32b5e11c7e677a6f8.tar.zst pttbbs-1dc564bc0c0626e0491012c32b5e11c7e677a6f8.zip |
Eliminate warnings
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4580 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/gomo.c')
-rw-r--r-- | mbbsd/gomo.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/mbbsd/gomo.c b/mbbsd/gomo.c index 575d4aee..b8a74cb6 100644 --- a/mbbsd/gomo.c +++ b/mbbsd/gomo.c @@ -37,7 +37,7 @@ static void gomo_drawstep(ChessInfo* info, const gomo_step_t* step); static void gomo_gameend(ChessInfo* info, ChessGameResult result); static void gomo_genlog(ChessInfo* info, FILE* fp, ChessGameResult result); -const static ChessActions gomo_actions = { +static const ChessActions gomo_actions = { &gomo_init_user, &gomo_init_user_userec, (void (*)(void*)) &gomo_init_board, @@ -54,7 +54,7 @@ const static ChessActions gomo_actions = { &gomo_genlog }; -const static ChessConstants gomo_constants = { +static const ChessConstants gomo_constants = { sizeof(gomo_step_t), MAX_TIME, BRDSIZ, @@ -241,9 +241,9 @@ gomoku_usr_put(userec_t* userec, const ChessUser* user) static char* gomo_getstep(const gomo_step_t* step, char buf[]) { - const static char* const ColName = "¢Ï¢Ð¢Ñ¢Ò¢Ó¢Ô¢Õ¢Ö¢×¢Ø¢Ù¢Ú¢Û¢Ü"; - const static char* const RawName = "151413121110¢¸¢·¢¶¢µ¢´¢³¢²¢±¢°"; - const static int ansi_length = sizeof(ANSI_COLOR(30;43)) - 1; + static const char* const ColName = "¢Ï¢Ð¢Ñ¢Ò¢Ó¢Ô¢Õ¢Ö¢×¢Ø¢Ù¢Ú¢Û¢Ü"; + static const char* const RawName = "151413121110¢¸¢·¢¶¢µ¢´¢³¢²¢±¢°"; + static const int ansi_length = sizeof(ANSI_COLOR(30;43)) - 1; strcpy(buf, turn_color[step->color]); buf[ansi_length ] = ColName[step->loc.c * 2]; @@ -282,13 +282,13 @@ gomo_init_board(board_t board) static void gomo_drawline(const ChessInfo* info, int line) { - const static char* const BoardPic[] = { + static const char* const BoardPic[] = { "ùÝ", "ùç", "ùç", "ùß", "ùò", "¢q", "¢q", "ùô", "ùò", "¢q", "¡Ï", "ùô", "ùã", "ùí", "ùí", "ùå", }; - const static int BoardPicIndex[] = + static const int BoardPicIndex[] = { 0, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 3 }; board_p board = (board_p) info->board; @@ -420,7 +420,7 @@ gomo_gameend(ChessInfo* info, ChessGameResult result) } static void -gomo_genlog(ChessInfo* info, FILE* fp, ChessGameResult result) +gomo_genlog(ChessInfo* info, FILE* fp, ChessGameResult result GCC_UNUSED) { char buf[ANSILINELEN] = ""; const int nStep = info->history.used; @@ -481,7 +481,7 @@ static int gomo_loadlog(FILE *fp, ChessInfo *info) gomo_init_user_userec(&rec, user); } else if (buf[0] == '[') { /* "[ 1]¡´ ==> H8 [ 2]¡³ ==> H9" */ - gomo_step_t step = { CHESS_STEP_NORMAL }; + gomo_step_t step = { .type = CHESS_STEP_NORMAL }; int c, r; const char *p = buf; int i; |