[fpc-pascal] Compiler Warning and Notices like unused variables etc.

Jason P Sage jasonpsage at jegas.org
Wed Jul 26 14:30:58 CEST 2006

I just wanted to say I LOVE the fact that the compiler warns you of these
mundane details. 

Personally, I don't consider my application at a good stopping point unless
I can make all the warnings go away. Sometimes I even will put in (hopefully
a low overhead thing when I do it)  a meaningless command to remove
"variable not initialized" warnings... when I KNOW I'm doing something to
init the variable that the compiler can't (nor is expected to) know I'm
doing that.


Procedure HiWorld;
Var MyVariable: ansistring;

  MyVariable:=MyVariable; // this is a workaround in rare cases.
  CallAReferenceProcedure(MyVariable); // This is warning material. 

Note: I know it MAY create a few assembly instructions - but I think I'll
take a couple of them to hush the compiler. 

It seems like a "CLEAN" thing to do... I mean, it raises doubt (speaking for
myself) when I compile something and there are warnings being displayed. It
makes me think the programmer has not addressed everything or my environment
might be the cause of said application to maybe not work as designed.

Jason P Sage


More information about the fpc-pascal mailing list