summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2012-04-28 13:52:59 +1000
committerChris Johns <chrisj@rtems.org>2012-04-28 13:52:59 +1000
commit6fa80fce36b2746f2780c604541939bc9f1b447c (patch)
tree2c678d8054ef982dfd4d634e1cdd5dac68999b61
parentff4ac1e4b784f60d29d7aa5eec9c6f2e776da0dd (diff)
Remove warnings.
-rw-r--r--dlfcn-shell.c3
-rw-r--r--dlfcn-shell.h19
-rw-r--r--main.c21
-rw-r--r--rtl-debugger.c3
-rw-r--r--rtl-shell.c3
-rw-r--r--x-long-name-to-create-gnu-extension-in-archive.c9
-rw-r--r--xa.c2
7 files changed, 43 insertions, 17 deletions
diff --git a/dlfcn-shell.c b/dlfcn-shell.c
index 88b9dcd..d531b9c 100644
--- a/dlfcn-shell.c
+++ b/dlfcn-shell.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
+ * COPYRIGHT (c) 2012 Chris Johns <chrisj@rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -27,6 +27,7 @@
#include <string.h>
#include <dlfcn.h>
+#include <dlfcn-shell.h>
static void*
convert_ascii_to_voidp (const char* arg)
diff --git a/dlfcn-shell.h b/dlfcn-shell.h
new file mode 100644
index 0000000..e371efb
--- /dev/null
+++ b/dlfcn-shell.h
@@ -0,0 +1,19 @@
+/*
+ * COPYRIGHT (c) 2012 Chris Johns <chrisj@rtems.org>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#if !defined(_DLFCN_SHELL_H_)
+#define _DLFCN_SHELL_H_
+
+int shell_dlopen (int argc, char* argv[]);
+int shell_dlclose (int argc, char* argv[]);
+int shell_dlsym (int argc, char* argv[]);
+int shell_dlcall (int argc, char* argv[]);
+
+#endif
diff --git a/main.c b/main.c
index cb24849..312513d 100644
--- a/main.c
+++ b/main.c
@@ -52,6 +52,8 @@ int remote_debug;
#include <rtl-shell.h>
#include <rtl-trace.h>
+#include <dlfcn-shell.h>
+
/*
* The tarfile is built automatically externally so we need to account
* for the leading symbol on the names.
@@ -200,7 +202,7 @@ rtems_driver_address_table rtems_idedisk_io_ops = {
/**
* Start the RTEMS Shell.
*/
-void
+static void
shell_start (void)
{
rtems_status_code sc;
@@ -213,7 +215,7 @@ shell_start (void)
/**
* Run the /shell-init script.
*/
-void
+static void
shell_init_script (void)
{
rtems_status_code sc;
@@ -224,7 +226,7 @@ shell_init_script (void)
printf ("error: running shell script: %s (%d)\n", rtems_status_text (sc), sc);
}
-int
+static int
setup_ramdisk (void)
{
rtems_device_major_number major;
@@ -249,7 +251,7 @@ setup_ramdisk (void)
return 0;
}
-int
+static int
setup_flashdisk (void)
{
#if RTEMS_APP_FLASHDISK
@@ -279,7 +281,7 @@ setup_flashdisk (void)
extern rtems_status_code rtems_ide_part_table_initialize (const char* );
#endif
-int
+static int
setup_idedisk (const char* path)
{
#if RTEMS_APP_IDEDISK
@@ -300,7 +302,7 @@ setup_idedisk (const char* path)
return 0;
}
-int
+static int
setup_rootfs (void)
{
rtems_status_code sc;
@@ -320,7 +322,7 @@ setup_rootfs (void)
return 0;
}
-int
+static int
shell_flash_erase (int argc, char* argv[])
{
#if RTEMS_APP_FLASHDISK
@@ -369,11 +371,6 @@ shell_flash_erase (int argc, char* argv[])
return 0;
}
-int shell_dlopen (int argc, char* argv[]);
-int shell_dlclose (int argc, char* argv[]);
-int shell_dlsym (int argc, char* argv[]);
-int shell_dlcall (int argc, char* argv[]);
-
int
main (int argc, char* argv[])
{
diff --git a/rtl-debugger.c b/rtl-debugger.c
index d6360ef..eb526f5 100644
--- a/rtl-debugger.c
+++ b/rtl-debugger.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
+ * COPYRIGHT (c) 2012 Chris Johns <chrisj@rtems.org>
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -29,6 +29,7 @@
#endif
#include <link.h>
+#include <rtl.h>
struct r_debug _rtld_debug;
diff --git a/rtl-shell.c b/rtl-shell.c
index fac9509..d8d7b49 100644
--- a/rtl-shell.c
+++ b/rtl-shell.c
@@ -36,6 +36,7 @@
#include <rtl.h>
#include <rtl-chain-iterator.h>
+#include <rtl-shell.h>
#include <rtl-trace.h>
/**
@@ -233,7 +234,7 @@ rtems_rtl_shell_object (rtems_rtl_data_t* rtl, int argc, char *argv[])
return 0;
}
-void
+static void
rtems_rtl_shell_usage (const char* arg)
{
printf ("%s: Runtime Linker\n", arg);
diff --git a/x-long-name-to-create-gnu-extension-in-archive.c b/x-long-name-to-create-gnu-extension-in-archive.c
index 55d614a..e94cf0c 100644
--- a/x-long-name-to-create-gnu-extension-in-archive.c
+++ b/x-long-name-to-create-gnu-extension-in-archive.c
@@ -8,8 +8,11 @@
static int zero;
unsigned int public = 0x12345678;
+void w_writeln(double d);
void x_writeln(const char* s);
void y_writeln(const char* s) __attribute__ ((section (".bar")));
+int z_writeln(int argc, const char* argv[]);
+int my_main (int argc, char* argv[]);
void
w_writeln(double d)
@@ -23,12 +26,14 @@ x_writeln(const char* s)
printf ("%s\n", s);
}
-void y_writeln(const char* s)
+void
+y_writeln(const char* s)
{
x_writeln (s);
}
-int z_writeln(int argc, const char* argv[])
+int
+z_writeln(int argc, const char* argv[])
{
int arg;
printf ("public = 0x%08x, zero = %d\n", public, ++zero);
diff --git a/xa.c b/xa.c
index f402449..20c927b 100644
--- a/xa.c
+++ b/xa.c
@@ -2,6 +2,8 @@
#include "x.h"
+void hello(void);
+
void
hello (void)
{