This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

gold patch committed: avoid warnings in testsuite


I committed this trivial patch to gold to avoid compiler warnings when
building the testsuite.

Ian


2008-12-09  Ian Lance Taylor  <iant@google.com>

	* testsuite/initpri1.c: Change all declarations to be full
	prototypes by adding void, to avoid compiler warnings.


Index: testsuite/initpri1.c
===================================================================
RCS file: /cvs/src/src/gold/testsuite/initpri1.c,v
retrieving revision 1.2
diff -u -r1.2 initpri1.c
--- testsuite/initpri1.c	29 Mar 2008 08:09:55 -0000	1.2
+++ testsuite/initpri1.c	9 Dec 2008 15:52:36 -0000
@@ -30,9 +30,9 @@
 int i;
 int j;
 
-void c1() __attribute__((constructor (500)));
-void c2() __attribute__((constructor (700)));
-void c3() __attribute__((constructor (600)));
+void c1(void) __attribute__((constructor (500)));
+void c2(void) __attribute__((constructor (700)));
+void c3(void) __attribute__((constructor (600)));
 
 void c1() {
   if (i++ != 0)
@@ -49,9 +49,9 @@
     abort ();
 }
 
-void d1() __attribute__((destructor (500)));
-void d2() __attribute__((destructor (700)));
-void d3() __attribute__((destructor (600)));
+void d1(void) __attribute__((destructor (500)));
+void d2(void) __attribute__((destructor (700)));
+void d3(void) __attribute__((destructor (600)));
 
 void d1() {
   if (--i != 0)
@@ -70,7 +70,7 @@
     abort ();
 }
 
-void cd4() __attribute__((constructor (800), destructor (800)));
+void cd4(void) __attribute__((constructor (800), destructor (800)));
 
 void cd4() {
   if (i != 3)
@@ -78,7 +78,7 @@
   ++j;
 }
 
-void cd5() __attribute__((constructor, destructor));
+void cd5(void) __attribute__((constructor, destructor));
 
 void cd5() {
   if (i != 3)
@@ -86,7 +86,7 @@
   ++j;
 }
 
-int main () {
+int main (void) {
   if (i != 3)
     return 1;
   if (j != 2)

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