[Freeciv-Dev] (PR#39455) Warning: makes integer from pointer without a cast in menu.c
http://bugs.freeciv.org/Ticket/Display.html?id=39455 > Committed patch to 2.1 as r13102 and trunk as r13103 ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#39455) Warning: makes integer from pointer without a cast in menu.c
http://bugs.freeciv.org/Ticket/Display.html?id=39455 > Ulrik Sverdrup wrote: > Thanks. You can check in that patch early since I broke the build; or > I can take care of it with your permission. > Generally, compile bugs should be checked in as fast as possible, by whomever finds and fixes them. Seems fine to me. ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#39455) Warning: makes integer from pointer without a cast in menu.c
http://bugs.freeciv.org/Ticket/Display.html?id=39455 > 2007/7/14, William Allen Simpson <[EMAIL PROTECTED]>: > > http://bugs.freeciv.org/Ticket/Display.html?id=39455 > > > Ulrik, as I learned the hard way myself, all developers should compile > with ./autogen.sh --enable-debug Thanks. You can check in that patch early since I broke the build; or I can take care of it with your permission. ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#39455) Warning: makes integer from pointer without a cast in menu.c
http://bugs.freeciv.org/Ticket/Display.html?id=39455 > Ulrik, as I learned the hard way myself, all developers should compile with ./autogen.sh --enable-debug ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#39455) Warning: makes integer from pointer without a cast in menu.c
http://bugs.freeciv.org/Ticket/Display.html?id=39455 > > [engla - Sam. Jul. 14 11:20:57 2007]: > > Caused by the checkin in #15260. Here is a patch that works with both > the 2.1 and trunk branches. > This patch looks very better. Thank you ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#39455)
http://bugs.freeciv.org/Ticket/Display.html?id=39455 > Caused by the checkin in #15260. Here is a patch that works with both the 2.1 and trunk branches. Index: client/gui-gtk-2.0/menu.c === --- client/gui-gtk-2.0/menu.c (revision 13101) +++ client/gui-gtk-2.0/menu.c (arbetskopia) @@ -1270,6 +1270,7 @@ const char *path = menu_path_remove_uline("/_Government/_Change Government"); GtkWidget *parent = gtk_item_factory_get_widget(item_factory, path); +bool attached_to_player = (game.player_ptr != NULL); if (parent) { GList *list, *iter; @@ -1326,11 +1327,11 @@ /* If the client is not attached to a player these reports are * disabled. */ -menus_set_sensitive("/_Reports/_Cities", game.player_ptr); -menus_set_sensitive("/_Reports/_Units", game.player_ptr); -menus_set_sensitive("/_Reports/_Economy", game.player_ptr); -menus_set_sensitive("/_Reports/_Science", game.player_ptr); -menus_set_sensitive("/_Reports/_Demographics", game.player_ptr); +menus_set_sensitive("/_Reports/_Cities", attached_to_player); +menus_set_sensitive("/_Reports/_Units", attached_to_player); +menus_set_sensitive("/_Reports/_Economy", attached_to_player); +menus_set_sensitive("/_Reports/_Science", attached_to_player); +menus_set_sensitive("/_Reports/_Demographics", attached_to_player); menus_set_sensitive("/_Reports/S_paceship", (game.player_ptr && game.player_ptr->spaceship.state != SSHIP_NONE)); ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#39455)
http://bugs.freeciv.org/Ticket/Display.html?id=39455 > Hello, i just compiled the last version of 2.1 from svn, i got: > menu.c: In function «update_menus": > menu.c:1279: attention : passing argument 2 of «menus_set_sensitive" makes integer from pointer without a cast > menu.c:1280: attention : passing argument 2 of «menus_set_sensitive" makes integer from pointer without a cast > menu.c:1281: attention : passing argument 2 of «menus_set_sensitive" makes integer from pointer without a cast > menu.c:1282: attention : passing argument 2 of «menus_set_sensitive" makes integer from pointer without a cast > menu.c:1283: attention : passing argument 2 of «menus_set_sensitive" makes integer from pointer without a cast I'm on a AMD64. You should convert game.player_ptr in bool, before pass it as argument. Thank you. ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev