[Freeciv-Dev] [patch #3603] CodingStyle: Do not initialize variables with nonsensical values

2013-01-21 Thread Marko Lindqvist
Update of patch #3603 (project freeciv):

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


___

Reply to this item at:

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

___
  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 #3603] CodingStyle: Do not initialize variables with nonsensical values

2013-01-19 Thread Marko Lindqvist
URL:
  http://gna.org/patch/?3603

 Summary: CodingStyle: Do not initialize variables with
nonsensical values
 Project: Freeciv
Submitted by: cazfi
Submitted on: Sat 19 Jan 2013 12:15:22 PM EET
Category: docs
Priority: 5 - Normal
  Status: Ready For Test
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: 2.3.4, 2.4.0, 2.5.0

___

Details:

This one goes against what earlier days was taught as good programming
practice, but with modern tools I think that *avoiding* variable
initialization just in case makes better code in the long run. Using wrong
value (with what variable happened to be initialized with) doesn't make it any
better than using uninitialized value, but such a initialization hides the
problem from debugging tools (gcc warnings, valgrind reports)

So, attached patch against CodingStyle says that variables for which there's
no correct initialization value, must be left uninitialized.



___

File Attachments:


---
Date: Sat 19 Jan 2013 12:15:22 PM EET  Name: DontInitialize.patch  Size: 759B 
 By: cazfi

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

___

Reply to this item at:

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

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


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