public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [pushed] Avoid some compiler warnings in gdb.ada
Date: Thu, 27 Apr 2023 10:32:05 -0600	[thread overview]
Message-ID: <20230427163205.3031287-1-tromey@adacore.com> (raw)

Running gdb.ada/verylong.exp shows a warning from the Ada compiler:

prog.adb:16:11: warning: file name does not match unit name, should be "main.adb" [enabled by default]

This patch fixes the problem, and another similar one in
unchecked_union.exp.
---
 gdb/testsuite/gdb.ada/unchecked_union/unchecked_union.adb | 4 ++--
 gdb/testsuite/gdb.ada/verylong/prog.adb                   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gdb/testsuite/gdb.ada/unchecked_union/unchecked_union.adb b/gdb/testsuite/gdb.ada/unchecked_union/unchecked_union.adb
index c3bccb69696..502c1da37bc 100644
--- a/gdb/testsuite/gdb.ada/unchecked_union/unchecked_union.adb
+++ b/gdb/testsuite/gdb.ada/unchecked_union/unchecked_union.adb
@@ -16,7 +16,7 @@
 with System;
 with Pck; use Pck;
 
-procedure Foo is
+procedure Unchecked_Union is
    type Key is (Alpha, Beta, Omega);
 
    type Inner(Disc : Key := Omega) is record
@@ -52,4 +52,4 @@ procedure Foo is
 
 begin
    Do_Nothing (Value'Address);          -- BREAK
-end Foo;
+end Unchecked_Union;
diff --git a/gdb/testsuite/gdb.ada/verylong/prog.adb b/gdb/testsuite/gdb.ada/verylong/prog.adb
index 766419d0a4f..63fba1d2d3a 100644
--- a/gdb/testsuite/gdb.ada/verylong/prog.adb
+++ b/gdb/testsuite/gdb.ada/verylong/prog.adb
@@ -13,8 +13,8 @@
 --  You should have received a copy of the GNU General Public License
 --  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-procedure Main is
+procedure Prog is
    X : Long_Long_Long_Integer := Long_Long_Long_Integer'Last;
 begin
    null; -- START
-end Main;
+end Prog;
-- 
2.39.1


                 reply	other threads:[~2023-04-27 16:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230427163205.3031287-1-tromey@adacore.com \
    --to=tromey@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).