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

2015-03-12 Thread Jürgen Hestermann
Am 2015-03-10 um 17:40 schrieb Sven Barth: > > It mutes the warning with the ID 5089 (the ID can be seen with -vq). So as long as the managed and unmanaged ones use the same warning ID (AFAIR they do) they will both be silenced. > Ups, no, they are different. So at least if you use a current 2.7

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

2015-03-10 Thread Jürgen Hestermann
Am 2015-03-10 um 18:52 schrieb Florian Klämpfl: > Using dyn. arrays without initialization makes litte sense in real world programs, Why this? I do this all the time. I know that they *are* already initialized so why should I do this again? > so those warnings have their use. Of what use are t

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

2015-03-10 Thread Florian Klämpfl
Am 10.03.2015 um 18:43 schrieb Jürgen Hestermann: > > Am 2015-03-10 um 18:16 schrieb Lukasz Sokol: >> On 10/03/15 16:08, Jürgen Hestermann wrote: >>> Then please tell me, what do you (or anybody else) gain from this warning? >>> Especially, as it claims something that is definitely not true (for m

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

2015-03-10 Thread Jürgen Hestermann
Am 2015-03-10 um 18:16 schrieb Lukasz Sokol: On 10/03/15 16:08, Jürgen Hestermann wrote: Then please tell me, what do you (or anybody else) gain from this warning? Especially, as it claims something that is definitely not true (for managed types). It may even misguide some to add initialisatio

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

2015-03-10 Thread Mattias Gaertner
On Tue, 10 Mar 2015 18:08:14 +0100 Jürgen Hestermann wrote: > Am 2015-03-10 um 17:40 schrieb Sven Barth: > > > It mutes the warning with the ID 5089 (the ID can be seen with -vq). So > as long as the managed and unmanaged ones use the same warning ID (AFAIR they > do) they will both be silence

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

2015-03-10 Thread Lukasz Sokol
On 10/03/15 16:08, Jürgen Hestermann wrote: > > Am 2015-03-10 um 09:48 schrieb Lukasz Sokol: >> 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/*

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

2015-03-10 Thread Lukasz Sokol
On 10/03/15 13:54, Sven Barth wrote: >> I mean, it's good to have this warning enabled by default and only suppress >> it around code >> that /I/ know it's bogus at. Otherwise, it /really/ wouldn't serve its >> purpose of pointing >> where a PEBKAC^WLOGIC ERROR may occur... >> >> Sort of like su

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

2015-03-10 Thread Lukasz Sokol
On 10/03/15 16:08, Jürgen Hestermann wrote: > > Am 2015-03-10 um 09:48 schrieb Lukasz Sokol: >> 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/*

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

2015-03-10 Thread Sven Barth
Am 10.03.2015 17:36 schrieb "Sven Barth" : > > Am 10.03.2015 17:25 schrieb "Jürgen Hestermann" : > > > > > > > Am 2015-03-10 um 10:08 schrieb Mattias Gaertner: > > > >> On Tue, 10 Mar 2015 08:48:49 + > >> Lukasz Sokol wrote: > >> > >>> On 10/03/15 06:10, Jürgen Hestermann wrote: > >>> [...] >

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

2015-03-10 Thread Sven Barth
Am 10.03.2015 17:25 schrieb "Jürgen Hestermann" : > > > Am 2015-03-10 um 10:08 schrieb Mattias Gaertner: > >> On Tue, 10 Mar 2015 08:48:49 + >> Lukasz Sokol wrote: >> >>> On 10/03/15 06:10, Jürgen Hestermann wrote: >>> [...] Why not simply omit these messages (for managed types)? >>>

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

2015-03-10 Thread Jürgen Hestermann
Am 2015-03-10 um 10:08 schrieb Mattias Gaertner: On Tue, 10 Mar 2015 08:48:49 + Lukasz Sokol wrote: On 10/03/15 06:10, Jürgen Hestermann wrote: [...] 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:

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

2015-03-10 Thread Jürgen Hestermann
Am 2015-03-10 um 09:48 schrieb Lukasz Sokol: 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 err

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

2015-03-10 Thread Sven Barth
Am 10.03.2015 13:05 schrieb "Lukasz Sokol" : > > On 10/03/15 09:08, Mattias Gaertner wrote: > > On Tue, 10 Mar 2015 08:48:49 + > > Lukasz Sokol wrote: > > > >> On 10/03/15 06:10, Jürgen Hestermann wrote: > >> [...] > >>> Why not simply omit these messages (for managed types)? > >> > >> Just be

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

2015-03-10 Thread Mattias Gaertner
On Tue, 10 Mar 2015 12:04:37 + Lukasz Sokol wrote: >[...] > > For example in Lazarus 1.3+ you can right click the message and > > click on "Hide with project option (-vm5089)". > > Cool, but probably not what I meant ;) as this hides it project-wide ? Yes. I guess that is what Jürgen wants.

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

2015-03-10 Thread Lukasz Sokol
On 10/03/15 09:08, Mattias Gaertner wrote: > On Tue, 10 Mar 2015 08:48:49 + > Lukasz Sokol wrote: > >> On 10/03/15 06:10, Jürgen Hestermann wrote: >> [...] >>> Why not simply omit these messages (for managed types)? >> >> Just because YOU don't need it, doesn't mean it's useless for everybody

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

2015-03-10 Thread Mattias Gaertner
On Tue, 10 Mar 2015 08:48:49 + Lukasz Sokol wrote: > On 10/03/15 06:10, Jürgen Hestermann wrote: >[...] > > 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/pro

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

2015-03-10 Thread Lukasz Sokol
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 >

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

2015-03-10 Thread Le Duc Hieu
March 2015 23:30To: FPC-Pascal users discussionsReply To: FPC-Pascal users discussionsSubject: [fpc-pascal] Warning "Local variable seems to be not initialized" on dyn array I get a warning that a local dynamic array variable is not initialized. Aren't suc

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

2015-03-09 Thread Jürgen Hestermann
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 m

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

2015-03-09 Thread 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) Jeff.

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

2015-03-09 Thread Jürgen Hestermann
Am 2015-03-09 um 18:31 schrieb Jonas Maebe: On 09 Mar 2015, at 17:49, Jürgen Hestermann wrote: Am 2015-03-09 um 17:40 schrieb Jonas Maebe: http://bugs.freepascal.org/view.php?id=24601#c75617 (and the comment below + use -vq to see warning numbers, and -vm to block a particular warning

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

2015-03-09 Thread Jonas Maebe
On 09 Mar 2015, at 17:49, Jürgen Hestermann wrote: > Am 2015-03-09 um 17:40 schrieb Jonas Maebe: >> >> http://bugs.freepascal.org/view.php?id=24601#c75617 (and the comment below + >> use -vq to see warning numbers, and -vm to block a particular warning >> number). > > Thanks for the ans

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

2015-03-09 Thread Jürgen Hestermann
Am 2015-03-09 um 17:40 schrieb Jonas Maebe: On 09 Mar 2015, at 17:25, Jürgen Hestermann wrote: I get a warning that a local dynamic array variable is not initialized. Aren't such managed types initialized by default? On http://wiki.freepascal.org/Dynamic_array it says: Actually, dynamic arra

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

2015-03-09 Thread Jonas Maebe
On 09 Mar 2015, at 17:25, Jürgen Hestermann wrote: I get a warning that a local dynamic array variable is not initialized. Aren't such managed types initialized by default? On http://wiki.freepascal.org/Dynamic_array it says: Actually, dynamic arrays are pointers with automatic dereferencing

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

2015-03-09 Thread Jürgen Hestermann
I get a warning that a local dynamic array variable is not initialized. Aren't such managed types initialized by default? On http://wiki.freepascal.org/Dynamic_array it says: Actually, dynamic arrays are pointers with automatic dereferencing. They are initialized to *nil* automatically. So why