apps: Fix the nightly build warning

src/cwindowfactory.cxx: In member function 'void Twm4Nx::CWindowFactory::redrawIcons(const nxgl_rect_s*)':
src/cwindowfactory.cxx:461:38: warning: 'iconPos.nxgl_point_s::y' may be used uninitialized in this function [-Wmaybe-uninitialized]
  461 |           iconBounds.pt2.y = iconPos.y + iconSize.h - 1;
      |                              ~~~~~~~~^
src/cwindowfactory.cxx:460:38: warning: 'iconPos.nxgl_point_s::x' may be used uninitialized in this function [-Wmaybe-uninitialized]
  460 |           iconBounds.pt2.x = iconPos.x + iconSize.w - 1;
      |                              ~~~~~~~~^

nsh_netcmds.c:424:20: warning: 'nsh_addrconv' defined but not used [-Wunused-function]
 static inline bool nsh_addrconv(FAR const char *hwstr,
                    ^
nsh_netcmds.c:446:20: warning: 'nsh_sethwaddr' defined but not used [-Wunused-function]
 static inline void nsh_sethwaddr(FAR const char *ifname,
                    ^

nsh_envcmds.c:94:21: warning: 'nsh_getdirpath' defined but not used [-Wunused-function]
 static inline char *nsh_getdirpath(FAR struct nsh_vtbl_s *vtbl,
                     ^

In file included from bas.c:84:0:
bas.c: In function 'bas_interpreter':
bas_error.h:110:37: warning: left-hand operand of comma expression has no effect [-Wunused-value]
 #define NOSUCHLINE         STATIC+40, _("No such line")
                                     ^
bas.c:2425:52: note: in expansion of macro 'NOSUCHLINE'
                           FS_putChars(STDCHANNEL, (NOSUCHLINE));
                                                    ^~~~~~~~~~
bas_fs.c:107:22: warning: 'g_vt100_colormap' defined but not used [-Wunused-const-variable=]
 static const uint8_t g_vt100_colormap[8] =
                      ^~~~~~~~~~~~~~~~
<stdout>:4048:16: warning: 'input' defined but not used [-Wunused-function]

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I62610b4c90e67637250cbd0107c2935c8abc542f
This commit is contained in:
Xiang Xiao 2020-03-09 00:13:09 +08:00 committed by patacongo
parent 58085e5983
commit 5720d72b71
6 changed files with 15 additions and 95 deletions

View File

@ -825,6 +825,11 @@ namespace Twm4Nx
{
m_iconWidget->getSize(size);
}
else
{
size.w = 0;
size.h = 0;
}
}
/**
@ -842,6 +847,11 @@ namespace Twm4Nx
{
m_iconWidget->getPos(pos);
}
else
{
pos.x = 0;
pos.y = 0;
}
}
/**

View File

@ -2422,7 +2422,7 @@ void bas_interpreter(void)
if (Program_goLine(&g_program, line->u.integer, &where) ==
(struct Pc *)0)
{
FS_putChars(STDCHANNEL, (NOSUCHLINE));
FS_putChars(STDCHANNEL, _("No such line\n"));
}
else
{

View File

@ -103,14 +103,6 @@ static int g_used;
static const int g_open_mode[4] = { 0, O_RDONLY, O_WRONLY, O_RDWR };
static char g_errmsgbuf[80];
#ifdef CONFIG_INTERPRETER_BAS_VT100
static const uint8_t g_vt100_colormap[8] =
{
VT100_BLACK, VT100_BLUE, VT100_GREEN, VT100_CYAN,
VT100_RED, VT100_MAGENTA, VT100_YELLOW, VT100_WHITE
};
#endif
/****************************************************************************
* Public Data
****************************************************************************/

View File

@ -1525,16 +1525,6 @@ static void yy_flex_strncpy (char *,yyconst char *,int);
static int yy_flex_strlen (yyconst char *);
#endif
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput (void);
#else
static int input (void);
#endif
#endif
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#ifdef __ia64__
@ -4038,80 +4028,6 @@ static int yy_get_next_buffer (void)
return yy_is_jam ? 0 : yy_current_state;
}
#ifndef YY_NO_INPUT
#ifdef __cplusplus
static int yyinput (void)
#else
static int input (void)
#endif
{
int c;
*(yy_c_buf_p) = (yy_hold_char);
if (*(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR)
{
/* yy_c_buf_p now points to the character we want to return.
* If this occurs *before* the EOB characters, then it's a
* valid NUL; if not, then we've hit the end of the buffer.
*/
if ((yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)])
/* This was really a NUL. */
*(yy_c_buf_p) = '\0';
else
{ /* need more input */
yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
++(yy_c_buf_p);
switch (yy_get_next_buffer())
{
case EOB_ACT_LAST_MATCH:
/* This happens because yy_g_n_b()
* sees that we've accumulated a
* token and flags that we need to
* try matching the token before
* proceeding. But for input(),
* there's no matching to consider.
* So convert the EOB_ACT_LAST_MATCH
* to EOB_ACT_END_OF_FILE.
*/
/* Reset buffer status. */
yyrestart(yyin);
/*FALLTHROUGH*/
case EOB_ACT_END_OF_FILE:
{
if (yywrap())
return EOF;
if (! (yy_did_buffer_switch_on_eof))
YY_NEW_FILE;
#ifdef __cplusplus
return yyinput();
#else
return input();
#endif
}
case EOB_ACT_CONTINUE_SCAN:
(yy_c_buf_p) = (yytext_ptr) + offset;
break;
}
}
}
c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */
*(yy_c_buf_p) = '\0'; /* preserve yytext */
(yy_hold_char) = *++(yy_c_buf_p);
return c;
}
#endif /* ifndef YY_NO_INPUT */
/** Immediately switch to a different input stream.
* @param input_file A readable stream.
*

View File

@ -91,6 +91,7 @@ static inline FAR const char *nsh_getwd(const char *wd)
* Name: nsh_getdirpath
****************************************************************************/
#ifndef CONFIG_DISABLE_ENVIRON
static inline char *nsh_getdirpath(FAR struct nsh_vtbl_s *vtbl,
const char *dirpath, const char *relpath)
{
@ -125,6 +126,7 @@ static inline char *nsh_getdirpath(FAR struct nsh_vtbl_s *vtbl,
return alloc;
}
#endif
/****************************************************************************
* Name: nsh_dumpvar

View File

@ -420,7 +420,7 @@ static int nsh_foreach_netdev(nsh_netdev_callback_t callback,
* Name: nsh_addrconv
****************************************************************************/
#ifdef HAVE_HWADDR
#if !defined(CONFIG_NSH_DISABLE_IFCONFIG) && defined(HAVE_HWADDR)
static inline bool nsh_addrconv(FAR const char *hwstr,
FAR mac_addr_t *macaddr)
{
@ -442,7 +442,7 @@ static inline bool nsh_addrconv(FAR const char *hwstr,
* Name: nsh_sethwaddr
****************************************************************************/
#ifdef HAVE_HWADDR
#if !defined(CONFIG_NSH_DISABLE_IFCONFIG) && defined(HAVE_HWADDR)
static inline void nsh_sethwaddr(FAR const char *ifname,
FAR mac_addr_t *macaddr)
{