[Freeciv-Dev] [bug #16453] trunk does not compile

2010-08-16 Thread pepeto

Follow-up Comment #5, bug #16453 (project freeciv):

> When adding casts, think carefully why you are throwing safety
> net like type safety away! Is it because you have broken
> something, and you have to force compiler to accept your error?

I totally agree with you. I just had wrong knowledge about enumerators. I
thought it was always of size 4. Sorry if I am not a pro in C language.


___

Reply to this item at:

  

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #16453] trunk does not compile

2010-08-16 Thread pepeto

Update of bug #16453 (project freeciv):

  Status:None => Works For Me   
 Open/Closed:Open => Closed 


___

Reply to this item at:

  

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #16453] trunk does not compile

2010-08-16 Thread pepeto

Follow-up Comment #4, bug #16453 (project freeciv):

> However, I notice that there is another dangerous cast there in
> line 4489: entry_int_get(pentry, FC_ENUM_PTR(saved_state))

Yes, I have already been warned about that, this is my mistake. I am
preparing a fix for that.


___

Reply to this item at:

  

___
  Message posté via/par Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #16453] trunk does not compile

2010-08-16 Thread Jordi Negrevernis i Font

Follow-up Comment #3, bug #16453 (project freeciv):

Yes, there was a confilct. Sorry.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #16453] trunk does not compile

2010-08-16 Thread anonymous

Follow-up Comment #2, bug #16453 (project freeciv):

Sounds like there was a conflict in doing the update, if you have a related
patch on already.  Do svn diff on the problem file and compare.

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #16453] trunk does not compile

2010-08-16 Thread Marko Lindqvist

Follow-up Comment #1, bug #16453 (project freeciv):

I cannot reproduce nor can I see what could cause this by reading the source
code. Maybe you are picking macro named saved_state somewhere and variable
name saved_state gets replaced with that...

However, I notice that there is another dangerous cast there in line 4489:
entry_int_get(pentry, FC_ENUM_PTR(saved_state))
entry_int_get() writes sizeof(int) bytes to space allocated for sizeof(enum
with max value 4). Latter might be only 1 byte.
When adding casts, think carefully why you are throwing safety net like type
safety away! Is it because you have broken something, and you have to force
compiler to accept your error?

___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #16453] trunk does not compile

2010-08-16 Thread Jordi Negrevernis i Font

URL:
  

 Summary: trunk does not compile
 Project: Freeciv
Submitted by: jorneg
Submitted on: Monday 08/16/10 at 16:08
Category: None
Severity: 4 - Important
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: trunk
 Discussion Lock: Any
Operating System: GNU/Linux
 Planned Release: 

___

Details:

 gcc -DHAVE_CONFIG_H -I. -I.. -I../utility -I./../common -I./../ai
-I../common/aicore -I./generator -I./scripting -I./advisors
-DLOCALEDIR=\"/usr/local/share/locale\"
"-DDEFAULT_DATA_PATH=\".:data:~/.freeciv/dev:/usr/local/share/freeciv\""
-DDEFAULT_SAVES_PATH=\"\"
"-DDEFAULT_SCENARIO_PATH=\".:data/scenario:~/.freeciv/scenarios:/usr/local/share/freeciv/scenario\""
-Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations
-g -O2 -MT savegame.lo -MD -MP -MF .deps/savegame.Tpo -c savegame.c -o
savegame.o
savegame.c: En la función ‘game_load_internal’:
savegame.c:4490: error: expected expression before ‘<<’ token
savegame.c:4488: aviso: variable ‘saved_state’ sin usar
savegame.c:5386: aviso: no hay un prototipo previo para ‘game_save’
savegame.c:5758: error: expected declaration or statement at end of input
make[3]: *** [savegame.lo] Error 1
make[3]: se sale del directorio `/home/jorneg/freeciv/trunk/freeciv/server'
make[2]: *** [all-recursive] Error 1
make[2]: se sale del directorio `/home/jorneg/freeciv/trunk/freeciv/server'
make[1]: *** [all-recursive] Error 1
make[1]: se sale del directorio `/home/jorneg/freeciv/trunk/freeciv'
make: *** [all] Error 2
jor...@ubuntu:~/freeciv/trunk/freeciv$ 





___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev