Re: [Gimp-developer] Testing on NULL an unitialized values

2010-04-22 Thread Tor Lillqvist
> 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

Re: [Gimp-developer] Testing on NULL an unitialized values

2010-04-22 Thread Tor Lillqvist
> 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 NU

Re: [Gimp-developer] Testing on NULL an unitialized values

2010-04-22 Thread Oliver Bandel
Zitat von "Sven Neumann" : > 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 "War

Re: [Gimp-developer] Testing on NULL an unitialized values

2010-04-22 Thread Oliver Bandel
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

Re: [Gimp-developer] Testing on NULL an unitialized values

2010-04-22 Thread Oliver Bandel
Zitat von "Sven Neumann" : > 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

[Gimp-developer] project gimp on sourceforge

2010-04-22 Thread Liam R E Quin
Someone has registered gimp on souceforge - http://gimp.sourceforge.net/ I see there's a Donate Money link, and a non-working download link, both of which may be harmful; maybe it's worth asking sourceforge for this not-gimp project to be deleted? This was from someone who wouldn't share it open

Re: [Gimp-developer] Trying to Make a Plug-In

2010-04-22 Thread Chris Mohler
On Thu, Apr 22, 2010 at 3:04 PM, Callie wrote: > My first question would be, what language should I be using and how do I set > it up so that it will work. I'd recommend python, as it is pretty easy to pick up even for the non-programmer. IIRC the OSX version of GIMP includes python support - yo

[Gimp-developer] Trying to Make a Plug-In

2010-04-22 Thread Callie
Hey guys, I have very limited experience in programming, and none at all with making plugins, but I want to make a plugin that would make my life a whole lot easier. Unfortunately, it seems that all the information regarding this process is written for people who are experienced in programming

Re: [Gimp-developer] Success-return-value

2010-04-22 Thread Sven Neumann
On Thu, 2010-04-22 at 15:46 +0200, Oliver Bandel wrote: > is there a convention for return values in Gimp, > which says: on success return TRUE or a value, > and on failure FALSE or NULL? That is the convention, yes. > Or can it be different at different sources, > rather be a taste of the one w

Re: [Gimp-developer] Testing on NULL an unitialized values

2010-04-22 Thread Sven Neumann
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 i

Re: [Gimp-developer] Testing on NULL an unitialized values

2010-04-22 Thread Sven Neumann
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

[Gimp-developer] Success-return-value

2010-04-22 Thread Oliver Bandel
Hello, is there a convention for return values in Gimp, which says: on success return TRUE or a value, and on fauilure FALSE or NULL? Or can it be different at different sources, rather be a taste of the one who developped something? Ciao, oliver ___

Re: [Gimp-developer] Testing on NULL an unitialized values

2010-04-22 Thread Fredrik Alströmer
On Thu, Apr 22, 2010 at 14:00, Oliver Bandel wrote: > Zitat von "Fredrik Alströmer" : >> 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 same value. > That mean: th

Re: [Gimp-developer] Testing on NULL an unitialized values

2010-04-22 Thread Oliver Bandel
Zitat von "Fredrik Alströmer" : > A couple of very small coins. > > On Thu, Apr 22, 2010 at 06:55, Martin Nordholts wrote: >> On 04/22/2010 03:54 AM, Marc Lehmann wrote: >>> On Wed, Apr 21, 2010 at 08:14:33PM +0200, Martin >>> Nordholts wrote: The compiler doesn't catch all cases, like th

Re: [Gimp-developer] Testing on NULL an unitialized values

2010-04-22 Thread Fredrik Alströmer
A couple of very small coins. On Thu, Apr 22, 2010 at 06:55, Martin Nordholts wrote: > On 04/22/2010 03:54 AM, Marc Lehmann wrote: >> On Wed, Apr 21, 2010 at 08:14:33PM +0200, Martin >> Nordholts  wrote: >>> The compiler doesn't catch all cases, like this one: >>> >>> #include >>> int main(int a