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,XPRIO autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,da8fecd51414cd54,start X-Google-Attributes: gid103376,public Path: g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!proxad.net!feeder2-1.proxad.net!news9-e.free.fr!not-for-mail From: "k_leau" Newsgroups: comp.lang.ada Subject: warning: cannot return a local value by reference Date: Thu, 3 Jun 2004 00:11:08 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Message-ID: <40be5080$0$9181$626a14ce@news.free.fr> Organization: Guest of ProXad - France NNTP-Posting-Date: 03 Jun 2004 00:11:12 MEST NNTP-Posting-Host: 81.56.189.156 X-Trace: 1086214272 news9-e.free.fr 9181 81.56.189.156:4328 X-Complaints-To: abuse@proxad.net Xref: g2news1.google.com comp.lang.ada:1039 Date: 2004-06-03T00:11:12+02:00 List-Id: Hello, I am new to Ada programming and I have the following problem: I am using the APQ binding for working with Postgresql. I have created the following spec "item_dbm_cls.ads" with the following: with item_cls, apq.postgresql.client; use item_cls, apq, apq.postgresql, apq.postgresql.client; package item_dbm_cls is type item_dbm is limited private; function new_item_dbm(it_dbm: item_dbm) return item_dbm; private type item_dbm is record it: item; connection: connection_type; end record; end item_dbm_cls; --------------------------------------- And a body "item_dbm_cls.adb" with: package body item_dbm_cls is function new_item_dbm(it_dbm: item_dbm) return item_dbm is i_dbm: item_dbm; begin set_host_name(i_dbm.connection, host_name(it_dbm.connection)); return i_dbm; end new_item_dbm; end item_dbm_cls; Why do I have this warning? What mistake have I done? Thanks for any help.