[Drawkit] DKGuide position mayhem

Alex Curylo alex at alexcurylo.com
Sun Jun 22 19:30:55 PDT 2008


On 22-Jun-08, at 7:19 PM, Graham Cox wrote:

> One thing to note in general is that if you ever have a method that  
> returns a float, it is essential that anything that needs to call it  
> imports its class's header so that it has the correct prototype.

That applies to "any non-default result", not just "a float".

> If not you get bizarre results that can even cause memory  
> corruption, not just bad return values, yet the compiler will give  
> absolutely no warning.

Unless you have set

GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES

like you should do if you would like to have any confidence that your  
code will, y'know, work.

-- 
Alex Curylo -- alex at alexcurylo.com -- http://www.alexcurylo.com/

"It was the most surreal feeling. Like:
  What _IS_ this pickaxe doing stuck in my skull??"
     -- James "ragwing" Asher





More information about the Drawkit mailing list