bugFreeciv - Bugs: bug #21370, Compile errors on 32bit systems

 
 
Show feedback again

bug #21370: Compile errors on 32bit systems

Submitted by:  Marko Lindqvist <cazfi>
Submitted on:  Tue 24 Dec 2013 08:09:25 AM UTC  
 
Category: generalSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Release: Operating System: None
Planned Release: 2.5.0, 2.6.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sat 28 Dec 2013 11:06:11 PM UTC, comment #7:

> will leave this ticket open

No need: I've split out bug #21386 for the remaining warning.

Jacob Nevins <jtn>
Project Administrator
Sat 28 Dec 2013 11:04:23 PM UTC, SVN revision 23909:

Fixed compilation errors on 32bit systems.

Reported by Jordi Negrevernis i Font

See bug #21370

(Browse SVN revision 23909)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat 28 Dec 2013 11:04:17 PM UTC, SVN revision 23908:

Fixed compilation errors on 32bit systems.

Reported by Jordi Negrevernis i Font

See bug #21370

(Browse SVN revision 23908)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat 28 Dec 2013 10:47:07 PM UTC, comment #4:

>> plrhand.c:2227: error: ‘least_misfits’ may be used
>> uninitialized in this function


> That must be my fault. I'll look into it.


I'll commit my current patches, but will leave this ticket open (though that remaining compile problem doesn't sound like 64bit/32bit issue. More like bad-heuristics-on-old-compiler.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Thu 26 Dec 2013 04:05:47 PM UTC, comment #3:

> plrhand.c:2227: error: ‘least_misfits’ may be used uninitialized in this function

That must be my fault. I'll look into it.

Jacob Nevins <jtn>
Project Administrator
Thu 26 Dec 2013 12:34:25 PM UTC, comment #2:

I applied the patches to the branches and now S2_5 compiles and i played a few with it and it seems to work correctly.

But trunk does not compile, it said:

CC plrhand.lo
cc1: warnings being treated as errors
plrhand.c: In function ‘fit_nationset_to_players’:
plrhand.c:2227: error: ‘least_misfits’ may be used uninitialized in this function
make[3]: *** [plrhand.lo] Error 1
make[3]: se sale del directorio «/home/jordi/freeciv/trunk/freeciv/server»
make[2]: *** [all-recursive] Error 1
make[2]: se sale del directorio «/home/jordi/freeciv/trunk/freeciv/server»
make[1]: *** [all-recursive] Error 1
make[1]: se sale del directorio «/home/jordi/freeciv/trunk/freeciv»
make: *** [all] Error 2

Jordi Negrevernis i Font <jorneg>
Project Member
Thu 26 Dec 2013 03:26:39 AM UTC, comment #1:

Can someone test if these patches help in 32bit systems?

(file #19520, file #19521)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 24 Dec 2013 08:09:25 AM UTC, original submission:

Jordi Negrevernis i Font wrote to freeciv-dev:
https://mail.gna.org/public/freeciv-dev/2013-12/msg00185.html

TRUNK:
registry_ini.c: In function ‘secfile_insert_include’:
registry_ini.c:1069: error: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘size_t’

S2_5:
dataio.c: In function ‘dio_put_sint32’:
dataio.c:331: error: integer constant is too large for ‘long’ type
dataio.c: In function ‘dio_get_sint32’:
dataio.c:740: error: integer constant is too large for ‘long’ type

These seem to be from -Werror build (probably --enable-debug) as it says "cc1: warnings being treated as errors"

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #19520:  32bit.patch added by cazfi (2kB - text/x-diff)
file #19521:  32bit-S2_5.patch added by cazfi (1kB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jtn (Posted a comment)
  • -unavailable- added by jorneg (Posted a comment)
  • -unavailable- added by cazfi (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 30 Dec 2013 04:22:15 AM UTCcazfiStatusReady For Test=>Fixed
      Assigned toNone=>cazfi
      Open/ClosedOpen=>Closed
    Thu 26 Dec 2013 03:26:39 AM UTCcazfiAttached File-=>Added 32bit.patch, #19520
      Attached File-=>Added 32bit-S2_5.patch, #19521
      StatusNone=>Ready For Test
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup