summaryrefslogtreecommitdiff
path: root/testcase
diff options
context:
space:
mode:
authorPeng Fan <van.freenix@gmail.com>2013-09-05 22:03:10 +0800
committerPeng Fan <van.freenix@gmail.com>2013-09-05 22:03:10 +0800
commit0048c847b0ae5df3f06e52bb8cb8f58196ca33ca (patch)
treeb5e761d32be00acb616e2e206b02b9f82ae26c55 /testcase
parent633c0e0d23c4b874c71595a4d9d13b8d4acdf417 (diff)
Fix warnings
Diffstat (limited to 'testcase')
-rw-r--r--testcase/1.c2
-rw-r--r--testcase/2.c7
-rw-r--r--testcase/3.c3
-rw-r--r--testcase/3.h5
-rw-r--r--testcase/33.c2
-rw-r--r--testcase/333.c2
-rw-r--r--testcase/4.c3
-rw-r--r--testcase/i.h7
8 files changed, 29 insertions, 2 deletions
diff --git a/testcase/1.c b/testcase/1.c
index f3ba414..83c16b5 100644
--- a/testcase/1.c
+++ b/testcase/1.c
@@ -1,3 +1,5 @@
+#include "i.h"
+
int global;
static char local;
diff --git a/testcase/2.c b/testcase/2.c
index 84efea1..812f033 100644
--- a/testcase/2.c
+++ b/testcase/2.c
@@ -1,3 +1,5 @@
+#include "i.h"
+
extern int global;
extern void hello(int);
@@ -10,6 +12,8 @@ void tst_pc16(void)
#endif
#if defined (__sparc__)
+void tst_wdisp(void);
+
void tst_wdisp(void)
{
printf("R_SPARC_DISP22: pass\n");
@@ -22,9 +26,12 @@ int test(int argc, char **argv)
global = 1; //inter-module data access
printf("In test() global = %d\n", global);
hello(2); //inter-module call
+
+ return 0;
}
int my_main(int argc, char **argv)
{
exit(0);
+ return 0;
}
diff --git a/testcase/3.c b/testcase/3.c
index 4e63c1b..0903300 100644
--- a/testcase/3.c
+++ b/testcase/3.c
@@ -1,4 +1,5 @@
-#include <stdio.h>
+#include "3.h"
+
int ar_func_test(void)
{
printf ("ar_func_test\n");
diff --git a/testcase/3.h b/testcase/3.h
new file mode 100644
index 0000000..612d30a
--- /dev/null
+++ b/testcase/3.h
@@ -0,0 +1,5 @@
+#include <stdio.h>
+
+int ar_func_test(void);
+int t1(void);
+int t2(void);
diff --git a/testcase/33.c b/testcase/33.c
index dfc08f8..c6132f5 100644
--- a/testcase/33.c
+++ b/testcase/33.c
@@ -1,3 +1,5 @@
+#include "3.h"
+
int t1(void)
{
return 1;
diff --git a/testcase/333.c b/testcase/333.c
index 0c810fc..da87a59 100644
--- a/testcase/333.c
+++ b/testcase/333.c
@@ -1,3 +1,5 @@
+#include "3.h"
+
int t2(void)
{
return 2;
diff --git a/testcase/4.c b/testcase/4.c
index f038c0b..8ddb376 100644
--- a/testcase/4.c
+++ b/testcase/4.c
@@ -1,4 +1,5 @@
-#include <stdio.h>
+#include "3.h"
+
int rtems(int argc, char **argv)
{
int a;
diff --git a/testcase/i.h b/testcase/i.h
new file mode 100644
index 0000000..4ce5b43
--- /dev/null
+++ b/testcase/i.h
@@ -0,0 +1,7 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+void hello(int arg);
+int rtems(int argc, char** argv);
+int test(int argc, char **argv);
+int my_main(int argc, char **argv);