Re: Testing on NULL an unitialized values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/21/2010 11:45 PM, Oliver Bandel wrote:
> Zitat von "Martin Nordholts"<enselic@xxxxxxxxx>:
>
>> On 04/21/2010 01:58 PM, Oliver Bandel wrote:
>>> Even only temporarily valies, if set to a certain value,
>>> like 0 or NULL, will help in finding problems.
>>
>> I agree, and I try to initialize all local variables that I either add
>> or modify the declaration of. I don't think it would be worth to commit
>> a patch that initializes all variables though
>
>
> Hmhhh...
>
> ...but the next time when you work on a function, you could just do
> that part too?

Only if I touch the variable declaration itself, not only the function. 
Since GIMP aligns local variables, it isn't that uncommon that you touch 
variable declarations you didn't add yourself.

> git blame?

Run it on a file in GIMP and you'll see what commit that last touched a 
line. That is very helpful if you are uncertain why the code looks like 
it does in a particular place. If the commiter did a good, job all you 
have to do is to read the commit message for the commit that last 
touched that place, and the intentions of the original programmer should 
be clear(er).

  / Martin


-- 

My GIMP Blog:
http://www.chromecode.com/
"GIMP 2.8 development still under control"
_______________________________________________
Gimp-developer mailing list
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux