This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[COMMITTED PATCH] Fix clang compilation errors in gdb.mi/basics.c


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);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]