summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-10-01 12:10:09 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-10-01 12:10:09 -0600
commit05b1c4870a2ea0a44dd9f22dacadc2a769e743eb (patch)
treeb479c53bd46e95570963e308bb559a5304ba3e39
parentedb29aa64e325bc41f0feb8a8a784bdad483a0a6 (diff)
downloadnuttx-05b1c4870a2ea0a44dd9f22dacadc2a769e743eb.tar.gz
nuttx-05b1c4870a2ea0a44dd9f22dacadc2a769e743eb.tar.bz2
nuttx-05b1c4870a2ea0a44dd9f22dacadc2a769e743eb.zip
Remove some warnings
-rw-r--r--apps/nshlib/nsh_console.c3
-rw-r--r--apps/nshlib/nsh_fscmds.c4
-rw-r--r--apps/nshlib/nsh_parse.c4
-rw-r--r--nuttx/libc/stdio/lib_printf.c2
-rw-r--r--nuttx/sched/sig_internal.h3
5 files changed, 12 insertions, 4 deletions
diff --git a/apps/nshlib/nsh_console.c b/apps/nshlib/nsh_console.c
index 41e992678..de7537bd7 100644
--- a/apps/nshlib/nsh_console.c
+++ b/apps/nshlib/nsh_console.c
@@ -175,10 +175,10 @@ static void nsh_closeifnotclosed(struct console_stdio_s *pstate)
static ssize_t nsh_consolewrite(FAR struct nsh_vtbl_s *vtbl, FAR const void *buffer, size_t nbytes)
{
+#if CONFIG_NFILE_DESCRIPTORS > 0
FAR struct console_stdio_s *pstate = (FAR struct console_stdio_s *)vtbl;
ssize_t ret;
-#if CONFIG_NFILE_DESCRIPTORS > 0
/* The stream is open in a lazy fashion. This is done because the file
* descriptor may be opened on a different task than the stream. The
* actual open will then occur with the first output from the new task.
@@ -238,7 +238,6 @@ static int nsh_consoleoutput(FAR struct nsh_vtbl_s *vtbl, const char *fmt, ...)
#else
va_list ap;
char *str;
- int ret;
/* Use avsprintf() to allocate a buffer and fill it with the formatted
* data
diff --git a/apps/nshlib/nsh_fscmds.c b/apps/nshlib/nsh_fscmds.c
index 26391fa3f..48dad2082 100644
--- a/apps/nshlib/nsh_fscmds.c
+++ b/apps/nshlib/nsh_fscmds.c
@@ -104,6 +104,7 @@ typedef int (*direntry_handler_t)(FAR struct nsh_vtbl_s *, const char *,
* Private Data
****************************************************************************/
+#if CONFIG_NFILE_DESCRIPTORS > 0
/* Common buffer for file I/O. Note the use of this common buffer precludes
* multiple copies of NSH running concurrently. It should be allocated per
* NSH instance and retained in the "vtbl" as is done for the telnet
@@ -111,6 +112,7 @@ typedef int (*direntry_handler_t)(FAR struct nsh_vtbl_s *, const char *,
*/
static char g_iobuffer[IOBUFFERSIZE];
+#endif
/****************************************************************************
* Public Data
@@ -142,6 +144,7 @@ static void trim_dir(char *arg)
* Name: nsh_getdirpath
****************************************************************************/
+#if CONFIG_NFILE_DESCRIPTORS > 0
static char *nsh_getdirpath(const char *path, const char *file)
{
/* Handle the case where all that is left is '/' */
@@ -158,6 +161,7 @@ static char *nsh_getdirpath(const char *path, const char *file)
g_iobuffer[PATH_MAX] = '\0';
return strdup(g_iobuffer);
}
+#endif
/****************************************************************************
* Name: foreach_direntry
diff --git a/apps/nshlib/nsh_parse.c b/apps/nshlib/nsh_parse.c
index 68dca6c08..9b45b0e32 100644
--- a/apps/nshlib/nsh_parse.c
+++ b/apps/nshlib/nsh_parse.c
@@ -1306,8 +1306,8 @@ int nsh_parse(FAR struct nsh_vtbl_s *vtbl, char *cmdline)
#if CONFIG_NFILE_STREAMS > 0
FAR char *redirfile = NULL;
int oflags = 0;
-#endif
int fd = -1;
+#endif
int argc;
int ret;
@@ -1654,9 +1654,9 @@ int nsh_parse(FAR struct nsh_vtbl_s *vtbl, char *cmdline)
else
#endif
{
+#if CONFIG_NFILE_STREAMS > 0
uint8_t save[SAVE_SIZE];
-#if CONFIG_NFILE_STREAMS > 0
/* Handle redirection of output via a file descriptor */
if (vtbl->np.np_redirect)
diff --git a/nuttx/libc/stdio/lib_printf.c b/nuttx/libc/stdio/lib_printf.c
index b035aa14f..178cf9c65 100644
--- a/nuttx/libc/stdio/lib_printf.c
+++ b/nuttx/libc/stdio/lib_printf.c
@@ -42,6 +42,8 @@
****************************************************************************/
#include <stdio.h>
+#include <syslog.h>
+
#include "lib_internal.h"
/****************************************************************************
diff --git a/nuttx/sched/sig_internal.h b/nuttx/sched/sig_internal.h
index 178ff54b9..e9a432092 100644
--- a/nuttx/sched/sig_internal.h
+++ b/nuttx/sched/sig_internal.h
@@ -155,6 +155,9 @@ extern sq_queue_t g_sigpendingirqsignal;
****************************************************************************/
/* Internal signal-related interfaces ***************************************/
+/* Forward references */
+
+struct task_group_s;
/* sig_intialize.c */