From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.182.68.102 with SMTP id v6mr981809obt.24.1460013027222; Thu, 07 Apr 2016 00:10:27 -0700 (PDT) X-Received: by 10.157.62.183 with SMTP id b52mr9329otc.1.1460013027152; Thu, 07 Apr 2016 00:10:27 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!nt3no8525207igb.0!news-out.google.com!j7ni73igm.0!nntp.google.com!nt3no8525198igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 7 Apr 2016 00:10:26 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2a02:120b:7f3:dcd0:f806:212b:2dfc:b2eb; posting-account=DQbqYQoAAACn8hHn2LmG2aF7Mhbxl_Lf NNTP-Posting-Host: 2a02:120b:7f3:dcd0:f806:212b:2dfc:b2eb References: <3be79ab3-ebc7-4169-9713-d50349662403@googlegroups.com> <4b5fb0cb-2dbd-47c1-a5e2-41d4ffcab84e@googlegroups.com> <531318fc-daf0-4f4e-bc82-2b48699f3cb5@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <52c794db-f6fd-4819-b92f-a1a6145281be@googlegroups.com> Subject: Re: Uninitialized out parameters. From: ahlan@marriott.org Injection-Date: Thu, 07 Apr 2016 07:10:27 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:30031 Date: 2016-04-07T00:10:26-07:00 List-Id: On Wednesday, April 6, 2016 at 11:45:02 AM UTC+2, Mark Lorenzen wrote: > On Tuesday, April 5, 2016 at 4:07:18 PM UTC+2, ah...@marriott.org wrote: > >=20 > > In my gpr I compile with > > package Compiler is > > for Default_Switches ("ada") use ("-O1", "-gnatQ", "-gnato", "-g"= , "-gnat12", > > "-gnatwcehijkmopruvz.c.n.p.t.w.= x", "-gnatykmpM120"); > > end Compiler; > >=20 > > Is there a warning that I need to explicitly switch on in order that GN= AT checks for out parameters in null procedures? >=20 > You have enabled a lot of warnings, but why not start with -gnatwa? That = is usually a good starting point and then you can add further swicthes. Try= to add -gnatwf that should enable warnings about unreferenced formal param= eters. >=20 > You can also use the GNATcheck tool to check your coding standard. GNATch= eck is able to find some instances of unassigned out parameters (rule Unass= igned_OUT_Parameters). If you want to be 100% sure that you do not have uni= nitialized variable or out parameters, you will need to use a stronger stat= ic analysis tool. >=20 > Regards, > Mark L We use -gnatwu which includes -gnatwf