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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.157.11.148 with SMTP id 20mr15071587oth.33.1459935900889; Wed, 06 Apr 2016 02:45:00 -0700 (PDT) X-Received: by 10.182.88.129 with SMTP id bg1mr39876obb.3.1459935900832; Wed, 06 Apr 2016 02:45:00 -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!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!nt3no8233454igb.0!news-out.google.com!u9ni619igk.0!nntp.google.com!gy3no479901igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 6 Apr 2016 02:45:00 -0700 (PDT) In-Reply-To: <531318fc-daf0-4f4e-bc82-2b48699f3cb5@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=193.163.1.105; posting-account=Srm5lQoAAAAEMX9rv2ilEKR6FDPapmSq NNTP-Posting-Host: 193.163.1.105 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: Subject: Re: Uninitialized out parameters. From: Mark Lorenzen Injection-Date: Wed, 06 Apr 2016 09:45:00 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2444 X-Received-Body-CRC: 1084701692 Xref: news.eternal-september.org comp.lang.ada:30005 Date: 2016-04-06T02:45:00-07:00 List-Id: 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 GNAT= checks for out parameters in null procedures? 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 t= o add -gnatwf that should enable warnings about unreferenced formal paramet= ers. You can also use the GNATcheck tool to check your coding standard. GNATchec= k is able to find some instances of unassigned out parameters (rule Unassig= ned_OUT_Parameters). If you want to be 100% sure that you do not have unini= tialized variable or out parameters, you will need to use a stronger static= analysis tool. Regards, Mark L