]> git.pld-linux.org Git - packages/ggz-gtk-games.git/blob - ggz-gtk-games-format.patch
- added format patch (fixes build with -Werror=format-security)
[packages/ggz-gtk-games.git] / ggz-gtk-games-format.patch
1 --- ggz-gtk-games-0.0.14.1/common/ggz_gtk.c.orig        2008-01-05 19:59:42.000000000 +0100
2 +++ ggz-gtk-games-0.0.14.1/common/ggz_gtk.c     2013-02-03 08:15:42.901064436 +0100
3 @@ -73,8 +73,7 @@ GGZMod *init_ggz_gtk(GtkWindow * main_wi
4         GGZMod *mod;
5  
6         if (!ggzmod_is_ggz_mode()) {
7 -               printf(_("This program should only be run from within GGZ."));
8 -               printf("\n");
9 +               puts(_("This program should only be run from within GGZ."));
10                 exit(1);
11         }
12  
13 --- ggz-gtk-games-0.0.14.1/dots/game.c.orig     2008-01-05 19:59:50.000000000 +0100
14 +++ ggz-gtk-games-0.0.14.1/dots/game.c  2013-02-03 08:21:46.257849136 +0100
15 @@ -219,7 +219,7 @@ void board_handle_click(GtkWidget * widg
16                 if (ggz_write_int(game.fd, DOTS_SND_MOVE_V) < 0
17                     || ggz_write_char(game.fd, line_x) < 0
18                     || ggz_write_char(game.fd, top) < 0) {
19 -                       ggz_error_msg(_("Lost server connection"));
20 +                       ggz_error_msg("%s", _("Lost server connection"));
21                         exit(1);
22                 }
23         } else {
24 @@ -244,7 +244,7 @@ void board_handle_click(GtkWidget * widg
25                 if (ggz_write_int(game.fd, DOTS_SND_MOVE_H) < 0
26                     || ggz_write_char(game.fd, left) < 0
27                     || ggz_write_char(game.fd, line_y) < 0) {
28 -                       ggz_error_msg(_("Lost server connection"));
29 +                       ggz_error_msg("%s", _("Lost server connection"));
30                         exit(1);
31                 }
32         }
33 --- ggz-gtk-games-0.0.14.1/dots/main.c.orig     2013-02-02 22:43:12.146613317 +0100
34 +++ ggz-gtk-games-0.0.14.1/dots/main.c  2013-02-03 08:22:08.785557229 +0100
35 @@ -360,7 +360,7 @@ static int get_move_status(void)
36         }
37  
38         if (status < 0)
39 -               ggz_error_msg(_("Client cheater!"));
40 +               ggz_error_msg("%s", _("Client cheater!"));
41  
42         return (int)status;
43  }
44 --- ggz-gtk-games-0.0.14.1/ggzcards/game.c.orig 2008-01-05 19:59:47.000000000 +0100
45 +++ ggz-gtk-games-0.0.14.1/ggzcards/game.c      2013-02-03 08:22:57.504476107 +0100
46 @@ -289,7 +289,7 @@ void game_handle_gameover(int num_winner
47  
48         /* handle different cases */
49         if (num_winners == 0)
50 -               snprintf(msg, sizeof(msg), _("There was no winner."));
51 +               snprintf(msg, sizeof(msg), "%s", _("There was no winner."));
52         else {
53                 int i;
54                 for (i = 0; i < num_winners; i++) {
55 @@ -306,7 +306,7 @@ void game_handle_gameover(int num_winner
56                                  sizeof(msg) - strlen(msg), fmt,
57                                  ggzcards.players[winners[i]].name);
58                 }
59 -               snprintf(msg + strlen(msg), sizeof(msg) - strlen(msg),
60 +               snprintf(msg + strlen(msg), sizeof(msg) - strlen(msg), "%s",
61                          _("won the game."));
62         }
63  
64 --- ggz-gtk-games-0.0.14.1/spades/gtk_io.c.orig 2008-01-05 19:59:38.000000000 +0100
65 +++ ggz-gtk-games-0.0.14.1/spades/gtk_io.c      2013-02-03 08:23:39.799764696 +0100
66 @@ -430,7 +430,7 @@ void DisplayScores(void)
67                                                     gameState.bids[i + 2]);
68                         }
69                 } else {
70 -                       buf = g_strdup_printf(_("  Bid:  "));
71 +                       buf = g_strdup_printf("%s", _("  Bid:  "));
72                 }
73  
74                 gtk_label_set_text(GTK_LABEL(playArea->bids[i]), buf);
This page took 0.078846 seconds and 4 git commands to generate.