comp.lang.ada
 help / color / mirror / Atom feed
From: Warren <ve3wwg@gmail.com>
Subject: Re: Dynamic Variant Record Creation
Date: Tue, 16 Mar 2010 20:44:51 +0000 (UTC)
Date: 2010-03-16T20:44:51+00:00	[thread overview]
Message-ID: <Xns9D3DAA5D6140BWarrensBlatherings@188.40.43.213> (raw)
In-Reply-To: wcchbogngp7.fsf@shell01.TheWorld.com

Robert A Duff expounded in news:wcchbogngp7.fsf@shell01.TheWorld.com:

> Warren <ve3wwg@gmail.com> writes:
>> *.adb:327:13: warning: variable "Result" is read but never assigned
>> Perhaps a dummy assignment after I am through with it
>> would be enough. Is there a better way of dealing with
>> the warning? 
> 
> When a warning is a false alarm, I think the appropriate way to
> deal with it is to use pragma Warnings.  

I'll dig that up tonight.

> But first make sure you really believe it is a false alarm,
> and then put in a comment explaining why.  (Sounds like
> in this case, it's OK because you have no components
> besides the discriminant).

Yep, in this specific case, anyway.

> Contorting the code (e.g. inserting a dummy assignment) is
> rarely the way to go.  Neither is it a good idea to simply
> ignore them -- you should be able to have a clean (warning-free)
> build.

Agreed.

> Warning: pragma Warnings is GNAT specific.  But that's OK;
> it won't harm portability.
> 
> - Bob

That's ok-- the project is skewed to gnat anyway.

Thanks, Warren



  reply	other threads:[~2010-03-16 20:44 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-16 17:11 Dynamic Variant Record Creation Warren
2010-03-16 18:31 ` Georg Bauhaus
2010-03-16 18:57 ` Adam Beneschan
2010-03-16 20:01   ` Warren
2010-03-16 20:09     ` Jeffrey R. Carter
2010-03-16 20:24       ` Warren
2010-03-16 20:40         ` Robert A Duff
2010-03-16 20:44           ` Warren [this message]
2010-03-16 20:31     ` Robert A Duff
2010-03-16 20:59       ` Warren
2010-03-16 21:55         ` Jeffrey R. Carter
2010-03-17 14:40           ` Warren
2010-03-18 12:57           ` Warren
2010-03-16 21:58         ` Robert A Duff
2010-03-17 14:22           ` Charmed Snark
2010-03-17 14:49             ` Robert A Duff
2010-03-17 16:30               ` Warren
2010-03-16 21:15       ` Adam Beneschan
2010-03-16 23:24       ` Adam Beneschan
2010-03-16 20:15   ` Robert A Duff
2010-03-16 21:00     ` Warren
2010-03-16 23:39   ` Randy Brukardt
2010-03-16 23:43     ` Randy Brukardt
2010-03-17  0:15     ` Robert A Duff
2010-03-17 14:28       ` Warren
2010-03-18  0:02       ` Randy Brukardt
2010-03-17  4:20     ` Adam Beneschan
2010-03-18  0:13       ` Randy Brukardt
2010-03-18 13:00         ` Warren
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox