diff --git a/examples/ostest/cond.c b/examples/ostest/cond.c
index 6214ea9d07f90224a8a4a55ca6a8b71568db871f..7c59f770e8d212d2d85a4667ce7bce40f1487dea 100644
--- a/examples/ostest/cond.c
+++ b/examples/ostest/cond.c
@@ -1,7 +1,7 @@
 /***********************************************************************
  * cond.c
  *
- *   Copyright (C) 2007 Gregory Nutt. All rights reserved.
+ *   Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
  *   Author: Gregory Nutt <spudmonkey@racsa.co.cr>
  *
  * Redistribution and use in source and binary forms, with or without
@@ -14,7 +14,7 @@
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 3. Neither the name Gregory Nutt nor the names of its contributors may be
+ * 3. Neither the name NuttX nor the names of its contributors may be
  *    used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -183,6 +183,7 @@ static void *thread_signaler(void *parameter)
 
   printf("thread_signaler: Terminating\n");
   pthread_exit(NULL);
+  return NULL; /* Non-reachable -- needed for some compilers */
 }
 
 void cond_test(void)
diff --git a/examples/ostest/main.c b/examples/ostest/main.c
index ddf60dafb2fa2c9178c2c347f63bb08e8243596f..c61e94cff05895d0c6b7507dc58a507813eb52d4 100644
--- a/examples/ostest/main.c
+++ b/examples/ostest/main.c
@@ -1,7 +1,7 @@
-/************************************************************
+/****************************************************************************
  * main.c
  *
- *   Copyright (C) 2007 Gregory Nutt. All rights reserved.
+ *   Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
  *   Author: Gregory Nutt <spudmonkey@racsa.co.cr>
  *
  * Redistribution and use in source and binary forms, with or without
@@ -14,7 +14,7 @@
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 3. Neither the name Gregory Nutt nor the names of its contributors may be
+ * 3. Neither the name NuttX nor the names of its contributors may be
  *    used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -31,15 +31,15 @@
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *
- ************************************************************/
+ ****************************************************************************/
 
-/************************************************************
+/****************************************************************************
  * Compilation Switches
- ************************************************************/
+ ****************************************************************************/
 
-/************************************************************
+/****************************************************************************
  * Included Files
- ************************************************************/
+ ****************************************************************************/
 
 #include <nuttx/config.h>
 #include <stdio.h>
@@ -50,9 +50,9 @@
 #include <nuttx/init.h>
 #include "ostest.h"
 
-/************************************************************
+/****************************************************************************
  * Definitions
- ************************************************************/
+ ****************************************************************************/
 
 #define PRIORITY   100
 #define NARGS        4
@@ -64,9 +64,9 @@
 # define STACKSIZE 8192
 #endif
 
-/************************************************************
+/****************************************************************************
  * Private Data
- ************************************************************/
+ ****************************************************************************/
 
 static const char arg1[] = "Arg1";
 static const char arg2[] = "Arg2";
@@ -110,13 +110,13 @@ const char g_putenv_value[] = "Variable1=BadValue3";
 
 #endif
 
-/************************************************************
+/****************************************************************************
  * Private Functions
- ************************************************************/
+ ****************************************************************************/
 
-/************************************************************
+/****************************************************************************
  * Name: show_memory_usage
- ************************************************************/
+ ****************************************************************************/
 
 #ifndef CONFIG_DISABLE_SIGNALS
 static void show_memory_usage(struct mallinfo *mmbefore,
@@ -134,9 +134,9 @@ static void show_memory_usage(struct mallinfo *mmbefore,
 # define show_memory_usage(mm1, mm2)
 #endif
 
-/************************************************************
+/****************************************************************************
  * Name: check_test_memory_usage
- ************************************************************/
+ ****************************************************************************/
 
 #ifndef CONFIG_DISABLE_SIGNALS
 static void check_test_memory_usage(void)
@@ -170,9 +170,9 @@ static void check_test_memory_usage(void)
 # define check_test_memory_usage()
 #endif
 
-/************************************************************
+/****************************************************************************
  * Name: show_environment
- ************************************************************/
+ ****************************************************************************/
 
 #ifndef CONFIG_DISABLE_ENVIRON
 static void show_variable(const char *var_name, const char *exptd_value, boolean var_valid)
@@ -219,9 +219,9 @@ static void show_environment(boolean var1_valid, boolean var2_valid, boolean var
 # define show_environment()
 #endif
 
-/************************************************************
+/****************************************************************************
  * Name: user_main
- ************************************************************/
+ ****************************************************************************/
 
 static int user_main(int argc, char *argv[])
 {
@@ -399,9 +399,9 @@ static int user_main(int argc, char *argv[])
   return 0;
 }
 
-/************************************************************
+/****************************************************************************
  * Name: stdio_test
- ************************************************************/
+ ****************************************************************************/
 
 static void stdio_test(void)
 {
@@ -420,22 +420,22 @@ static void stdio_test(void)
 #endif
 }
 
-/************************************************************
+/****************************************************************************
  * Public Functions
- ************************************************************/
+ ****************************************************************************/
 
-/************************************************************
+/****************************************************************************
  * user_initialize
- ************************************************************/
+ ****************************************************************************/
 
 void user_initialize(void)
 {
   /* stub */
 }
 
-/************************************************************
+/****************************************************************************
  * user_start
- ************************************************************/
+ ****************************************************************************/
 
 int user_start(int argc, char *argv[])
 {
diff --git a/examples/ostest/mutex.c b/examples/ostest/mutex.c
index 5edf60dbaac8d2d049f19357f646538dbbe6e434..752f833f25288d610e4b3f4df54bef588786f265 100644
--- a/examples/ostest/mutex.c
+++ b/examples/ostest/mutex.c
@@ -1,7 +1,7 @@
 /***********************************************************************
  * mutex.c
  *
- *   Copyright (C) 2007 Gregory Nutt. All rights reserved.
+ *   Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
  *   Author: Gregory Nutt <spudmonkey@racsa.co.cr>
  *
  * Redistribution and use in source and binary forms, with or without
@@ -14,7 +14,7 @@
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 3. Neither the name Gregory Nutt nor the names of its contributors may be
+ * 3. Neither the name NuttX nor the names of its contributors may be
  *    used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -86,6 +86,7 @@ static void *thread_func(void *parameter)
         }
     }
   pthread_exit(NULL);
+  return NULL; /* Non-reachable -- needed for some compilers */
 }
 
 void mutex_test(void)
diff --git a/include/stdlib.h b/include/stdlib.h
index c1eaf28d004468ff558ddf6b96537af2b4ead4a2..58a07ac2d924eba84c1b59ae2931295cd81da5c9 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -106,7 +106,7 @@ EXTERN int       rand(void);
 #ifndef CONFIG_DISABLE_ENIVRON
 EXTERN FAR char **get_environ_ptr( void );
 EXTERN FAR char *getenv(FAR const char *name);
-EXTERN int       putenv(FAR char *string);
+EXTERN int       putenv(FAR const char *string);
 EXTERN int       clearenv(void);
 EXTERN int       setenv(const char *name, const char *value, int overwrite);
 EXTERN int       unsetenv(const char *name);
diff --git a/lib/lib_fopen.c b/lib/lib_fopen.c
index 438454606b08319c35ba0d21d3fb3615cd6e939d..68c3ccdb65496fd6c409559f20b92b6699c120ea 100644
--- a/lib/lib_fopen.c
+++ b/lib/lib_fopen.c
@@ -135,7 +135,7 @@ FAR struct file_struct *lib_fdopen(int fd, const char *mode,
   FAR struct inode *inode = flist->fl_files[fd].f_inode;
   FILE             *stream;
   int               oflags = lib_mode2oflags(mode);
-  int               err;
+  int               err = OK;
   int               i;
 
   if (fd < 0 || !flist || !slist)
diff --git a/sched/env_putenv.c b/sched/env_putenv.c
index 7ea8ef96b6f894778f96cbb4dc948eafafd0941b..5049b30d1b0e00a56d08a6d3ec83671b8af0a229 100644
--- a/sched/env_putenv.c
+++ b/sched/env_putenv.c
@@ -1,7 +1,7 @@
 /****************************************************************************
  * env_putenv.c
  *
- *   Copyright (C) 2007 Gregory Nutt. All rights reserved.
+ *   Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
  *   Author: Gregory Nutt <spudmonkey@racsa.co.cr>
  *
  * Redistribution and use in source and binary forms, with or without
@@ -14,7 +14,7 @@
  *    notice, this list of conditions and the following disclaimer in
  *    the documentation and/or other materials provided with the
  *    distribution.
- * 3. Neither the name Gregory Nutt nor the names of its contributors may be
+ * 3. Neither the name Gregory NuttX nor the names of its contributors may be
  *    used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -75,7 +75,7 @@
  *
  ****************************************************************************/
 
-int putenv(char *string)
+int putenv(FAR const char *string)
 {
   char *pname;
   char *pequal;