Re: [Freeciv-Dev] (PR#39405) S2_1 compile fails in diplodlg.c
http://bugs.freeciv.org/Ticket/Display.html?id=39405 > Daniel Markstedt wrote: > I have some kind of header problem here. Despite this, gettext seems > to work. Reported it two years ago (see the latter part of the ticket > at http://rt.freeciv.org/Ticket/Display.html?id=13287 ) > I'm running the same platform, MacOSX 10.3.9 on this machine with MacPorts, and have no compilation errors or warnings You might try backing up, reinstalling the OS, the 10.03.9 combo update, and then MacPorts again. I had to do that last September during the transition from DarwinPorts to MacPorts. >> Works for me >> (...) > > Still no luck. Note that I'm talking about client/gui-sdl/citydlg.c > And I'm talking about some other citydlg.c, as I'm not running or testing SDL Looks like somebody wrote that SDL code with perl or something. Yech! For example, in the section you mention, I've just discovered that the code not only doesn't consistently use access functions, but it doesn't even consistently use its own local variables! That unit_type_iterates with "un" variable; assigns pUnit = un; though that's a unittype so it should be pUnitType, and a complete waste of time and confusing to have two of the same variables; uses un some places and pUnit in others; and sometimes bypasses the local variables altogether by using "->type" (a no-no) instead of the unit_type() access function! Similar problems with pName and "->name" (another no-no)! The access functions have been around for years, there's no excuse for such bad coding practices. :-( I'll try to find the problems by guess and by golly, but no promises Maybe you should lobby the master developers to have SDL be the official platform for 2.1.0 -- after all, in the 2+ years since 2.1 was branched, SDL has gotten somewhat better. Anyway, having a lot of users would help find and fix the bugs! ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#39405) S2_1 compile fails in diplodlg.c
http://bugs.freeciv.org/Ticket/Display.html?id=39405 > On 7/1/07, William Allen Simpson <[EMAIL PROTECTED]> wrote: > > http://bugs.freeciv.org/Ticket/Display.html?id=39405 > > > Daniel Markstedt wrote: > > As of r13028, build fails in citydlg.c instead: > > > > citydlg.c: In function `units_orders_city_dlg_callback': > > citydlg.c:416: error: structure has no member named `type' > > citydlg.c:419: warning: implicit declaration of function `gettext' > > Note that you have header problems, somehow you are not including gettext. > I have some kind of header problem here. Despite this, gettext seems to work. Reported it two years ago (see the latter part of the ticket at http://rt.freeciv.org/Ticket/Display.html?id=13287 ) > Works for me > (...) Still no luck. Note that I'm talking about client/gui-sdl/citydlg.c ~Daniel ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
Re: [Freeciv-Dev] (PR#39405) S2_1 compile fails in diplodlg.c
http://bugs.freeciv.org/Ticket/Display.html?id=39405 > Daniel Markstedt wrote: > As of r13028, build fails in citydlg.c instead: > > citydlg.c: In function `units_orders_city_dlg_callback': > citydlg.c:416: error: structure has no member named `type' > citydlg.c:419: warning: implicit declaration of function `gettext' Note that you have header problems, somehow you are not including gettext. Works for me gcc -no-cpp-precomp -I/opt/local/include -L/opt/local/lib -DHAVE_CONFIG_H -I. -I../.. -I. -I./.. -I./../include -I../../utility -I../../common -I../../common/aicore -I../../intl -I./../agents -DXTHREADS -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pango-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include/libpng12 -I/usr/X11R6/include-Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -DLOCALEDIR="\"/Users/wastrel/freeciv-stable/share/locale\"" -DDEFAULT_DATA_PATH="\".:data:~/.freeciv:/Users/wastrel/freeciv-stable/share/freeciv\"" -g -O2 -Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -fsigned-char -MT citydlg.o -MD -MP -MF .deps/citydlg.Tpo -c -o citydlg.o citydlg.c mv -f .deps/citydlg.Tpo .deps/citydlg.Po gcc -no-cpp-precomp -I/opt/local/include -L/opt/local/lib -DHAVE_CONFIG_H -I. -I../.. -I. -I./.. -I./../include -I../../utility -I../../common -I../../common/aicore -I../../intl -I./../agents -DXTHREADS -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/pango-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include/libpng12 -I/usr/X11R6/include-Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -DLOCALEDIR="\"/Users/wastrel/freeciv-stable/share/locale\"" -DDEFAULT_DATA_PATH="\".:data:~/.freeciv:/Users/wastrel/freeciv-stable/share/freeciv\"" -g -O2 -Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -fsigned-char -MT citydlg.o -MD -MP -MF .deps/citydlg.Tpo -c -o citydlg.o citydlg.c mv -f .deps/citydlg.Tpo .deps/citydlg.Po (success, no errors or warnings) ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev
[Freeciv-Dev] (PR#39405) S2_1 compile fails in diplodlg.c
http://bugs.freeciv.org/Ticket/Display.html?id=39405 > As of r13028, build fails in citydlg.c instead: citydlg.c: In function `units_orders_city_dlg_callback': citydlg.c:416: error: structure has no member named `type' citydlg.c:419: warning: implicit declaration of function `gettext' citydlg.c:419: warning: format argument is not a pointer (arg 4) citydlg.c:435: error: structure has no member named `type' citydlg.c:443: warning: passing arg 2 of `copy_chars_to_string16' makes pointer from integer without a cast citydlg.c:454: warning: passing arg 2 of `copy_chars_to_string16' makes pointer from integer without a cast citydlg.c:467: warning: passing arg 2 of `copy_chars_to_string16' makes pointer from integer without a cast citydlg.c:482: warning: passing arg 2 of `copy_chars_to_string16' makes pointer from integer without a cast citydlg.c:498: warning: passing arg 2 of `copy_chars_to_string16' makes pointer from integer without a cast citydlg.c:512: warning: passing arg 2 of `copy_chars_to_string16' makes pointer from integer without a cast citydlg.c:526: warning: passing arg 2 of `copy_chars_to_string16' makes pointer from integer without a cast citydlg.c:540: warning: passing arg 2 of `copy_chars_to_string16' makes pointer from integer without a cast citydlg.c: In function `create_present_supported_units_widget_list': citydlg.c:693: error: structure has no member named `type' citydlg.c:696: error: structure has no member named `name' citydlg.c:698: warning: pointer/integer type mismatch in conditional expression citydlg.c:701: warning: pointer/integer type mismatch in conditional expression citydlg.c: In function `create_city_options_widget_list': citydlg.c:934: warning: passing arg 3 of `my_snprintf' makes pointer from integer without a cast citydlg.c:955: warning: format argument is not a pointer (arg 4) citydlg.c: In function `popup_hurry_production_dialog': citydlg.c:1149: warning: passing arg 3 of `my_snprintf' makes pointer from integer without a cast citydlg.c:1154: warning: passing arg 3 of `my_snprintf' makes pointer from integer without a cast citydlg.c:1159: warning: passing arg 3 of `my_snprintf' makes pointer from integer without a cast citydlg.c:1162: warning: passing arg 3 of `my_snprintf' makes pointer from integer without a cast citydlg.c:1166: warning: passing arg 2 of `copy_chars_to_string16' makes pointer from integer without a cast citydlg.c:1192: warning: passing arg 2 of `copy_chars_to_string16' makes pointer from integer without a cast citydlg.c:1203: warning: passing arg 2 of `copy_chars_to_string16' makes pointer from integer without a cast citydlg.c: In function `sell_imprvm_dlg_callback': citydlg.c:1381: warning: passing arg 2 of `copy_chars_to_string16' makes pointer from integer without a cast citydlg.c:1396: warning: passing arg 3 of `my_snprintf' makes pointer from integer without a cast citydlg.c:1406: warning: passing arg 2 of `copy_chars_to_string16' makes pointer from integer without a cast citydlg.c:1414: warning: passing arg 2 of `copy_chars_to_string16' makes pointer from integer without a cast citydlg.c: In function `redraw_misc_city_dialog': citydlg.c:1726: warning: passing arg 3 of `my_snprintf' makes pointer from integer without a cast citydlg.c: In function `redraw_supported_units_city_dialog': citydlg.c:1772: warning: implicit declaration of function `ngettext' citydlg.c:1772: warning: passing arg 3 of `my_snprintf' makes pointer from integer without a cast citydlg.c: In function `redraw_army_city_dialog': citydlg.c:1831: warning: passing arg 3 of `my_snprintf' makes pointer from integer without a cast citydlg.c: In function `redraw_info_city_dialog': citydlg.c:1880: warning: passing arg 3 of `my_snprintf' makes pointer from integer without a cast citydlg.c:1902: warning: passing arg 3 of `my_snprintf' makes pointer from integer without a cast citydlg.c:1929: warning: passing arg 3 of `my_snprintf' makes pointer from integer without a cast citydlg.c:1942: warning: passing arg 3 of `my_snprintf' makes pointer from integer without a cast citydlg.c:1967: warning: format argument is not a pointer (arg 4) citydlg.c:1991: warning: passing arg 3 of `my_snprintf' makes pointer from integer without a cast citydlg.c:2003: warning: passing arg 3 of `my_snprintf' makes pointer from integer without a cast citydlg.c: In function `redraw_happyness_city_dialog': citydlg.c:2036: warning: passing arg 3 of `my_snprintf' makes pointer from integer without a cast citydlg.c: In function `redraw_city_dialog': citydlg.c:2516: warning: passing arg 3 of `my_snprintf' makes pointer from integer without a cast citydlg.c:2531: warning: passing arg 3 of `my_snprintf' makes pointer from integer without a cast citydlg.c:2545: warning: passing arg 3 of `my_snprintf' makes pointer from integer without a cast citydlg.c:2561: warning: passing arg 3 of `my_snprintf' makes pointer from integer without a cast citydlg.c:2597: warning: passing arg 1 of `skip_intl_qualifier_prefix' makes pointer f
[Freeciv-Dev] (PR#39405) S2_1 compile fails in diplodlg.c
http://bugs.freeciv.org/Ticket/Display.html?id=39405 > S2_1 r13004 on OSX 10.3.9; while compiling gui_sdl: diplodlg.c: In function `gold_callback': diplodlg.c:369: warning: implicit declaration of function `gettext' diplodlg.c:369: warning: passing arg 1 of `append_output_window' makes pointer from integer without a cast diplodlg.c: In function `popup_diplomatic_objects': diplodlg.c:447: warning: passing arg 2 of `copy_chars_to_string16' makes pointer from integer without a cast diplodlg.c:456: warning: passing arg 1 of `skip_intl_qualifier_prefix' makes pointer from integer without a cast diplodlg.c:470: warning: passing arg 1 of `skip_intl_qualifier_prefix' makes pointer from integer without a cast diplodlg.c:485: warning: passing arg 1 of `skip_intl_qualifier_prefix' makes pointer from integer without a cast diplodlg.c:506: warning: passing arg 2 of `copy_chars_to_string16' makes pointer from integer without a cast diplodlg.c:519: warning: passing arg 2 of `copy_chars_to_string16' makes pointer from integer without a cast diplodlg.c:527: warning: format argument is not a pointer (arg 4) diplodlg.c:541: warning: format argument is not a pointer (arg 4) diplodlg.c:558: warning: passing arg 2 of `copy_chars_to_string16' makes pointer from integer without a cast diplodlg.c:573: warning: passing arg 3 of `my_snprintf' makes pointer from integer without a cast diplodlg.c:607: warning: passing arg 2 of `copy_chars_to_string16' makes pointer from integer without a cast diplodlg.c:614: error: structure has no member named `name' diplodlg.c:639: error: structure has no member named `name' diplodlg.c:685: warning: passing arg 2 of `copy_chars_to_string16' makes pointer from integer without a cast diplodlg.c: In function `update_diplomacy_dialog': diplodlg.c:825: warning: passing arg 3 of `my_snprintf' makes pointer from integer without a cast diplodlg.c:877: warning: passing arg 2 of `copy_chars_to_string16' makes pointer from integer without a cast diplodlg.c:889: warning: passing arg 2 of `copy_chars_to_string16' makes pointer from integer without a cast diplodlg.c: In function `popup_war_dialog': diplodlg.c:1298: warning: passing arg 3 of `my_snprintf' makes pointer from integer without a cast diplodlg.c:1315: warning: passing arg 3 of `my_snprintf' makes pointer from integer without a cast diplodlg.c:1328: warning: passing arg 2 of `copy_chars_to_string16' makes pointer from integer without a cast diplodlg.c:1338: warning: passing arg 2 of `copy_chars_to_string16' makes pointer from integer without a cast diplodlg.c: In function `popup_diplomacy_dialog': diplodlg.c:1426: warning: passing arg 3 of `my_snprintf' makes pointer from integer without a cast diplodlg.c:1443: warning: passing arg 3 of `my_snprintf' makes pointer from integer without a cast diplodlg.c:1457: warning: passing arg 3 of `my_snprintf' makes pointer from integer without a cast diplodlg.c:1459: warning: passing arg 3 of `my_snprintf' makes pointer from integer without a cast diplodlg.c:1482: warning: passing arg 2 of `copy_chars_to_string16' makes pointer from integer without a cast diplodlg.c:1499: warning: passing arg 2 of `copy_chars_to_string16' makes pointer from integer without a cast diplodlg.c:1513: warning: passing arg 2 of `copy_chars_to_string16' makes pointer from integer without a cast make[3]: *** [diplodlg.o] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 ~Daniel ___ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev