[Freeciv-Dev] [bug #22014] road_integrators_cache_init(): conditional jump or move depends on uninitialised

2014-05-06 Thread Emmet Hikory
Follow-up Comment #5, bug #22014 (project freeciv):

Indeed it does.  Using the construction:


  int road_idx = road_index(oroad);
  bv_roads integrates = proad-integrates;
  bool integrator = FALSE;

  /* BV_CLR_ALL(integrates); */
  /* integrator = BV_ISSET(integrates, road_idx); */
  if (integrates.vec[road_idx] == TRUE) {
integrator = TRUE;
  }


results in the same warning on the integrates.vec[] check.  If the BV_CLR_ALL
statement is uncommented, there are no warnings.  Looking at the caller (in
ruleset.c), the bitvector is cleared prior to a for loop.  The for loop
conditionally sets some values with BV_SET().  I'm unsure how this could be
uninitialised, unless there is something odd about the pointer mapping between
extras and roads.

___

Reply to this item at:

  http://gna.org/bugs/?22014

___
  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 #22014] road_integrators_cache_init(): conditional jump or move depends on uninitialised

2014-05-06 Thread pepeto
Follow-up Comment #6, bug #22014 (project freeciv):

 Looking at the caller (in ruleset.c), the bitvector is cleared
 prior to a for loop.

But it is included in a road type iteration, so the integrates filed of roads
listed later is not initialized.

I see a function named road_type_init(). Shouldn't it be initialized there?
Else it could be initialized in another loop in load_rulesetdir()?


___

Reply to this item at:

  http://gna.org/bugs/?22014

___
  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 #22014] road_integrators_cache_init(): conditional jump or move depends on uninitialised

2014-05-06 Thread Emmet Hikory
Update of bug #22014 (project freeciv):

  Status:None = Ready For Test 
 Assigned to:None = persia 
 Planned Release: = 2.6.0  

___

Follow-up Comment #7:

Aha, yes.  Attached is a patch moving it outside that context, which has the
side benefit of only running it once (which ought improve performance). 
Thanks a lot for the help debugging this.



(file #20661)
___

Additional Item Attachment:

File name: move-road-integrator-cache-init-outside-road-loop.patch Size:0 KB


___

Reply to this item at:

  http://gna.org/bugs/?22014

___
  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 #21988] Genhash collision handling very inefficient

2014-05-06 Thread pepeto
Update of bug #21988 (project freeciv):

  Status: In Progress = Ready For Test 

___

Follow-up Comment #2:

Second version of the patch: fix that the number of entries is correct and
refactor genhash_resize_table().

I have tested all functions. It looks to work as expected. Now waiting to
performance comments...


(file #20663)
___

Additional Item Attachment:

File name: genhash2.diff  Size:22 KB


___

Reply to this item at:

  http://gna.org/bugs/?21988

___
  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 #22015] Nation color in ruleset based on most common color from nation flag

2014-05-06 Thread Andreas Rosdal
URL:
  http://gna.org/bugs/?22015

 Summary: Nation color in ruleset based on most common color
from nation flag
 Project: Freeciv
Submitted by: andreasr
Submitted on: Tue 06 May 2014 07:21:59 PM UTC
Category: general
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:

I would like the player's nation color to be chosen from one or a few of the
most common colors in the nation's flag, and that color stored in the ruleset.
For Freeciv players it will be easier to find players on the minimap. It will
also be easier to remember players in the game if their color is based on
their flag. At the moment there is a separate column in the nations dialog
listing each players color, and this extra color is extra information about a
player which adds no value. 

When selecting a nation color, steps would have to be taken to reduce the
number of color collisions between nation colors.

Perhaps a script could be created to iterate over all the nations, determine a
nation color based on the nation's flag, while also keeping the number of
color collisions to a minimum, then write that color back to the nations
ruleset file.




___

Reply to this item at:

  http://gna.org/bugs/?22015

___
  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] [patch #4677] Alien government bonus changes to README

2014-05-06 Thread Marko Lindqvist
Update of patch #4677 (project freeciv):

  Status:  Ready For Test = Done   
 Assigned to:None = cazfi  
 Open/Closed:Open = Closed 


___

Reply to this item at:

  http://gna.org/patch/?4677

___
  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 #21988] Genhash collision handling very inefficient

2014-05-06 Thread Marko Lindqvist
Update of bug #21988 (project freeciv):

Category:None = general
 Planned Release: = 2.6.0  

___

Follow-up Comment #3:

 Now waiting to performance comments...

At least the source reads like what I had in mind. I'll setup some test runs
by the end of the week.

___

Reply to this item at:

  http://gna.org/bugs/?21988

___
  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] [patch #4678] tile_index() as macro

2014-05-06 Thread Marko Lindqvist
Update of patch #4678 (project freeciv):

  Status:  Ready For Test = Done   
 Assigned to:None = cazfi  
 Open/Closed:Open = Closed 


___

Reply to this item at:

  http://gna.org/patch/?4678

___
  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] [patch #4685] Renamed allowed_city_styles as allowed_styles

2014-05-06 Thread Marko Lindqvist
URL:
  http://gna.org/patch/?4685

 Summary: Renamed allowed_city_styles as allowed_styles
 Project: Freeciv
Submitted by: cazfi
Submitted on: Wed 07 May 2014 02:08:30 AM EEST
Category: general
Priority: 5 - Normal
  Status: Ready For Test
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: 2.6.0

___

Details:

It's now list of styles, not city_styles.




___

File Attachments:


---
Date: Wed 07 May 2014 02:08:30 AM EEST  Name: AllowedStyles.patch  Size: 2kB  
By: cazfi

http://gna.org/patch/download.php?file_id=20664

___

Reply to this item at:

  http://gna.org/patch/?4685

___
  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 #22016] 'willBePossible' used uninitialized

2014-05-06 Thread Marko Lindqvist
URL:
  http://gna.org/bugs/?22016

 Summary: 'willBePossible' used uninitialized
 Project: Freeciv
Submitted by: cazfi
Submitted on: Wed 07 May 2014 02:30:32 AM EEST
Category: ai
Severity: 3 - Normal
Priority: 5 - Normal
  Status: Ready For Test
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: 2.6.0

___

Details:

Found when compiling with clang.

willBePossible is ever only set to TRUE, so it's uninitialized when it's being
checked. Fix attached

Fix also naming of the variables to match coding style.



___

File Attachments:


---
Date: Wed 07 May 2014 02:30:32 AM EEST  Name: InitWillBePossible.patch  Size:
2kB   By: cazfi

http://gna.org/bugs/download.php?file_id=20665

___

Reply to this item at:

  http://gna.org/bugs/?22016

___
  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] [patch #4684] Orange Free State and South African Republic Rulesets

2014-05-06 Thread Caleb
Follow-up Comment #1, patch #4684 (project freeciv):

I just updated both city lists, and fixed a small stripe problem on the Orange
shield.
(By the way, I'm the one who first posted these rulesets, but I didn't create
an account on Gna until today. And if calling the this a quality patch
sounds cocky, I actually didn't intend to include that in the original
submission. Sorry.)

(file #20666)
___

Additional Item Attachment:

File name: OFS_and_ZAR.zipSize:35 KB


___

Reply to this item at:

  http://gna.org/patch/?4684

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


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