[fpc-pascal] Warning "Local variable seems to be not initialized" on dyn array

Lukasz Sokol el.es.cr at gmail.com
Tue Mar 10 09:48:49 CET 2015


On 10/03/15 06:10, Jürgen Hestermann wrote:
> 
> Am 2015-03-09 um 19:24 schrieb DaWorm:
>> I would think this part answers that question:  "The warning means
>> that no value has been */explicitly/* assigned to these variables
>> (which */may indicate a logic error/* in the code), not necessarily
>> that they contain an unpredictable value." (emphasis mine)
>> 
>> 
> No, it answer not the question. As I already wrote in my other mail: 
> Why am I forced to add superfluous (initialization) code just to get
> rid of a warning that is completely useless (false). Managed types
> *are* initialized so this warning just pollutes the message window
> and distracts from the realy useful information.
> 
> Why not simply omit these messages (for managed types)?
> 
> 

Just because YOU don't need it, doesn't mean it's useless for everybody...

http://www.freepascal.org/docs-html/prog/progsu80.html#x87-860001.2.80

why not just use this to suppress the warning JUST where you DO know it's not needed?

(you can suppress warning by number too IIUC).


el es





More information about the fpc-pascal mailing list