Re: Testing on NULL an unitialized values

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

 



Hi,

On Thu, 2010-04-22 at 14:38 +0200, Fredrik Alströmer wrote:

> For the record, I'm not necessarily against setting a predefined value
> to variables sometimes. I'm just against doing it for the wrong
> reasons, and I'd much rather have the compiler say "Warning: might be
> used uninitialized in this context" as a part of the static analysis,
> rather than chase down the bug where a value is 0 at run time
> (remember, I'm primarily talking corner cases here).

Totally agreed. I also prefer the compiler telling me that a refactoring
I've just done is not correct because I forgot to initialize a variable
in a code path. This has happened to me and the compiler warning caught
some potential bugs. If we would always initialize all variables this
mistake would have gone unnoticed.


Sven


_______________________________________________
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