[examples-v2 commit] Clean up warnings.

Chris Johns chrisj at rtems.org
Fri Sep 5 03:34:16 UTC 2014


Module:    examples-v2
Branch:    master
Commit:    fe684ef291f69d7ac517e0338a2605635ccd6f4c
Changeset: http://git.rtems.org/examples-v2/commit/?id=fe684ef291f69d7ac517e0338a2605635ccd6f4c

Author:    Chris Johns <chrisj at rtems.org>
Date:      Fri Sep  5 13:43:01 2014 +1000

Clean up warnings.

---

 benchmarks/nbench/main.c      |    6 +++---
 file_io/crc/init.c            |    4 ++--
 filesystem/fat_ramdisk/init.c |    4 ++--
 gdb/overwrite/rtems_init.c    |    2 ++
 4 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/benchmarks/nbench/main.c b/benchmarks/nbench/main.c
index 7c094bd..8c5616d 100644
--- a/benchmarks/nbench/main.c
+++ b/benchmarks/nbench/main.c
@@ -1,7 +1,7 @@
 /*
  *  Written by Petri Rokka <petri.rokka at tut.fi> based
  *  upon numerous RTEMS examples.
- *   
+ *
  *  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.
@@ -63,7 +63,7 @@ int nbench_main(int argc, char **argv);
 
 rtems_task task_nbench(rtems_task_argument arg)
 {
-  char **args[1] = {"./nbench"};
+  char *args[1] = {"./nbench"};
   nbench_main(1, args);
 }
 
@@ -71,7 +71,7 @@ rtems_task Init(rtems_task_argument arg)
 {
   rtems_status_code   sc;
   rtems_id            task_id_nbench;
-  char              **args[1] = {"./nbench"};
+  char               *args[1] = {"./nbench"};
   rtems_interval      tickspersec;
 
   /*
diff --git a/file_io/crc/init.c b/file_io/crc/init.c
index 83c423c..015da47 100644
--- a/file_io/crc/init.c
+++ b/file_io/crc/init.c
@@ -35,11 +35,11 @@ rtems_task Init(
   puts( "\n\n*** untar/imfs/crc example ***" );
 
   printf("Unpacking tar filesystem\nThis may take awhile...\n");
-  if(Untar_FromMemory(FilesystemImage, FilesystemImage_size) != 0) {
+  if(Untar_FromMemory((char*) FilesystemImage, FilesystemImage_size) != 0) {
     printf("Can't unpack tar filesystem\n");
     exit(1);
   }
-	
+
   crc32file(in_file,&crc, &charcnt);
   printf("%08lX %7ld %s\n", crc, charcnt, in_file);
 
diff --git a/filesystem/fat_ramdisk/init.c b/filesystem/fat_ramdisk/init.c
index 5a52d27..2fff705 100644
--- a/filesystem/fat_ramdisk/init.c
+++ b/filesystem/fat_ramdisk/init.c
@@ -56,7 +56,7 @@ int setup_ramdisk (const char* mntpath)
 {
   rtems_device_major_number major;
   rtems_status_code         sc;
-  
+
   /*
    * Register the RAM Disk driver.
    */
@@ -111,7 +111,7 @@ rtems_task Init(
   puts( "\n\n*** ramdisk/fat example ***" );
 
   printf("Unpacking tar filesystem\nThis may take awhile...\n");
-  if(Untar_FromMemory(FilesystemImage, FilesystemImage_size) != 0) {
+  if(Untar_FromMemory((char*) FilesystemImage, FilesystemImage_size) != 0) {
     printf("Can't unpack tar filesystem\n");
     exit(1);
   }
diff --git a/gdb/overwrite/rtems_init.c b/gdb/overwrite/rtems_init.c
index 8b421af..00d8ea2 100644
--- a/gdb/overwrite/rtems_init.c
+++ b/gdb/overwrite/rtems_init.c
@@ -2,6 +2,8 @@
  *  Wrapper for Overwrite main().
  */
 
+#include <stdlib.h>
+
 #include <bsp.h>
 
 int main( int, char ** );



More information about the vc mailing list