From: Doug Evans <dje@google.com>
To: gdb-patches@sourceware.org
Subject: [COMMITTED PATCH] Fix clang compilation errors in gdb.mi/basics.c
Date: Mon, 25 Aug 2014 19:44:00 -0000 [thread overview]
Message-ID: <yjt2sikkqrqf.fsf@ruffy.mtv.corp.google.com> (raw)
Hi.
This patch gets a few more tests working with clang.
gdb compile failed, ../../../binutils-gdb/gdb/testsuite/gdb.mi/basics.c:32:1: warning: type
specifier missing, defaults to 'int' [-Wimplicit-int]
callee3 (char *strarg)
^
../../../binutils-gdb/gdb/testsuite/gdb.mi/basics.c:35:1: warning: control
reaches end of non-void function [-Wreturn-type]
}
^
...
2014-08-25 Doug Evans <dje@google.com>
* gdb.mi/basics.c (callee3, callee2, callee1): Specify result type.
(main): Ditto.
diff --git a/gdb/testsuite/gdb.mi/basics.c b/gdb/testsuite/gdb.mi/basics.c
index 0a4f9de..0eabcd1 100644
--- a/gdb/testsuite/gdb.mi/basics.c
+++ b/gdb/testsuite/gdb.mi/basics.c
@@ -29,17 +29,17 @@ int callee4 (void)
C = A + B;
return 0;
}
-callee3 (char *strarg)
+void callee3 (char *strarg)
{
callee4 ();
}
-callee2 (int intarg, char *strarg)
+void callee2 (int intarg, char *strarg)
{
callee3 (strarg);
}
-callee1 (int intarg, char *strarg, double fltarg)
+void callee1 (int intarg, char *strarg, double fltarg)
{
callee2 (intarg, strarg);
}
@@ -57,7 +57,7 @@ void do_nothing (void)
{
}
-main ()
+int main ()
{
callee1 (2, "A string argument.", 3.5);
callee1 (2, "A string argument.", 3.5);
next reply other threads:[~2014-08-25 19:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-25 19:44 Doug Evans [this message]
2014-08-25 21:39 ` Andrew Pinski
2014-08-25 21:57 ` Doug Evans
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=yjt2sikkqrqf.fsf@ruffy.mtv.corp.google.com \
--to=dje@google.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