Hello,
just because I found a nice jargon entry, which supports
my view, I relate to that old topic again.
On Wed, Apr 21, 2010 at 12:33:15PM +0200, Oliver Bandel wrote:
[...]
I would do EVERY pointer set to NULL, when defining it.
And normally I also would set ANY other value to a certain
Zitat von Sven Neumann s...@gimp.org:
On Wed, 2010-04-21 at 18:30 +0200, Martin Nordholts wrote:
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
Hi Frederik,
my main attend was to mention the problem of pointers, regarding
uninitialized values. That's why I insisted on Null, and it makes
sense often to use 0 or 0.0 for other values.
As strings are char*, NULL should be used, not .
You are right, that in some seldom situations it
Zitat von Sven Neumann s...@gimp.org:
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
You are right, that in some seldom situations it might make sense
to initialize values to other start values. But they should always be
predictable.
You didn't get the reasoning about letting the compiler, or valgrind,
catch use of uninitialized variables, did you?
The same is here: a
Will the compiler stop execution on any warning? It should, and not
compile any code that gives warnings, otherwise your attempt will not
work. People will ignore it just for testing.
That depends on the project. Many projects do use flags like -Werror,
although that is not always possible.
Am Freitag, 23. April 2010 08:39:52 schrieb Oliver Bandel:
Zitat von Sven Neumann s...@gimp.org:
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
Zitat von Tor Lillqvist t...@iki.fi:
You are right, that in some seldom situations it might make sense
to initialize values to other start values. But they should always be
predictable.
You didn't get the reasoning about letting the compiler, or valgrind,
catch use of uninitialized
Zitat von Torsten Neuer tne...@inwise.de:
Am Freitag, 23. April 2010 08:39:52 schrieb Oliver Bandel:
Zitat von Sven Neumann s...@gimp.org:
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
Zitat von Tor Lillqvist t...@iki.fi:
You are right, that in some seldom situations it might make sense
to initialize values to other start values. But they should always be
predictable.
You didn't get the reasoning about letting the compiler, or valgrind,
catch use of uninitialized variables,
Am Freitag, 23. April 2010 schrub Oliver Bandel:
Zitat von Tor Lillqvist t...@iki.fi:
You are right, that in some seldom situations it might make sense
to initialize values to other start values. But they should always be
predictable.
You didn't get the reasoning about letting the
hehe,
the segfault did not came from the char* mytext,
but from wrong indexing in the vector. :(
my fault :(
Heheh... nevertheless valgrind is on my side ;-)
Somehow I got no crash from the uninitialized char*,
but that might only happen after release at the user's computer:
It's
A couple of very small coins.
On Thu, Apr 22, 2010 at 06:55, Martin Nordholts ense...@gmail.com wrote:
On 04/22/2010 03:54 AM, Marc Lehmann wrote:
On Wed, Apr 21, 2010 at 08:14:33PM +0200, Martin
Nordholtsense...@gmail.com wrote:
The compiler doesn't catch all cases, like this one:
Zitat von Fredrik Alströmer r...@excu.se:
A couple of very small coins.
On Thu, Apr 22, 2010 at 06:55, Martin Nordholts ense...@gmail.com wrote:
On 04/22/2010 03:54 AM, Marc Lehmann wrote:
On Wed, Apr 21, 2010 at 08:14:33PM +0200, Martin
Nordholtsense...@gmail.com wrote:
The compiler
On Thu, Apr 22, 2010 at 14:00, Oliver Bandel oli...@first.in-berlin.de wrote:
Zitat von Fredrik Alströmer r...@excu.se:
And no valgrind, or
static analyzers will notice that you're reading an uninitialized
zero.
No problem.
You have that defined value, and with each run it gives you the
On Wed, 2010-04-21 at 18:30 +0200, Martin Nordholts wrote:
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
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
Hello,
since some days I'm browsing through the Gimp-Code.
What I have seen so far looks very tidy.
But I also found some things that I would do differently, throughout
the whole code, and maybe also in the libs (I didn't looked at them in
detail).
I would do EVERY pointer set to NULL,
The test
if( template )
makes only sense, if you can be sure that uninitialzed values
will definitelky be NULL.
You must have missed the g_return_val_if_fail (! template ||
GIMP_IS_CONTEXT (template), NULL) .
It checks if template is NULL or a pointer to a valid GimpContext. If
template is
Zitat von Tor Lillqvist t...@iki.fi:
The test
if( template )
makes only sense, if you can be sure that uninitialzed values
will definitelky be NULL.
You must have missed the g_return_val_if_fail (! template ||
GIMP_IS_CONTEXT (template), NULL) .
It checks if template is NULL or a
On 04/21/2010 11:58 AM, Oliver Bandel wrote:
Zitat von Tor Lillqvistt...@iki.fi:
The test
if( template )
makes only sense, if you can be sure that uninitialzed values
will definitelky be NULL.
You must have missed the g_return_val_if_fail (! template ||
GIMP_IS_CONTEXT (template),
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
On Wed, 2010-04-21 at 13:58 +0200, Oliver Bandel wrote:
Even only temporarily valies, if set to a certain value,
like 0 or NULL, will help in finding problems.
Should be totally un-necessary as the compiler will warn you if your
code uses uninitialized variables. We are compiling with -Wall
On 04/21/2010 07:53 PM, Sven Neumann wrote:
On Wed, 2010-04-21 at 13:58 +0200, Oliver Bandel wrote:
Even only temporarily valies, if set to a certain value,
like 0 or NULL, will help in finding problems.
Should be totally un-necessary as the compiler will warn you if your
code uses
On Wed, 2010-04-21 at 12:33 +0200, Oliver Bandel wrote:
Example:
==
/*/
/* public functions
/
GimpContext
Zitat von Sven Neumann s...@gimp.org:
On Wed, 2010-04-21 at 12:33 +0200, Oliver Bandel wrote:
Example:
==
/*/
/* public functions
Hi,
Zitat von Omari Stephens x...@csail.mit.edu:
On 04/21/2010 11:58 AM, Oliver Bandel wrote:
Zitat von Tor Lillqvistt...@iki.fi:
[...]
Even only temporarily valies, if set to a certain value,
like 0 or NULL, will help in finding problems.
The mentioned function just was an example.
Zitat von Martin Nordholts ense...@gmail.com:
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
Zitat von Sven Neumann s...@gimp.org:
On Wed, 2010-04-21 at 12:33 +0200, Oliver Bandel wrote:
Example:
==
/*/
/* public functions
On 04/21/2010 11:45 PM, Oliver Bandel wrote:
Zitat von Martin Nordholtsense...@gmail.com:
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
On 04/22/2010 03:54 AM, Marc Lehmann wrote:
On Wed, Apr 21, 2010 at 08:14:33PM +0200, Martin Nordholtsense...@gmail.com
wrote:
The compiler doesn't catch all cases, like this one:
#includestdio.h
int main(int argc, char **argv)
{
int var;
if (argc == 2)
var = 42;
Testing list posting
-Yosh
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
hi,
i am in an interesting situation here. i live in the same area as the
latest gimp author http://gimpbook.com/
this area is Mountain View, California. it is very much to my dismay
that i have not *seen* akkana since we celebrated her birthday in 2004.
i humbly submit that i also did not
On 1 Dec 2002, at 7:10, Patrick McFarland wrote:
Hello? Anyone home?
Read you loud and clear.
--
branko collin
[EMAIL PROTECTED]
___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Hi,
Argh! Rather late, I put up the press release I promised to make at
http://www.xs4all.nl/~collin/gimp/pr/gimp123pr.html.
If you want to comment on it, please go ahead.
If you want to use it, please go ahead too (just drop me a line so
that we don't do any duplicate work).
If you want
On Thursday 28 March 2002 01:40, Branko Collin wrote:
Hi,
Argh! Rather late, I put up the press release I promised to make
at http://www.xs4all.nl/~collin/gimp/pr/gimp123pr.html.
If you want to comment on it, please go ahead.
I think I found one small language error. In the last paragraph
Test. Woohow.
-Yosh
___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
I did not receive any messages from it for a while, and it seems that
http://lists.xcf.berkeley.edu/ is not responding to HTTP requests.
Is everything OK there at XCF?
Regards,
Shlomi Fish
--
Shlomi Fish
38 matches
Mail list logo