NSH: Eliminate a warning when all memory inspection commands are disabled.
This commit is contained in:
parent
bab5df0966
commit
590791e12d
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* apps/nshlib/dbg_dbgcmds.c
|
* apps/nshlib/dbg_dbgcmds.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009, 2011-2012, 2015 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2009, 2011-2012, 2015, 2017 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@ -57,10 +57,17 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#undef NSH_HAVE_MEMCMDS
|
||||||
|
#if !defined(CONFIG_NSH_DISABLE_MB) || !defined(CONFIG_NSH_DISABLE_MH) || \
|
||||||
|
!defined(CONFIG_NSH_DISABLE_MW)
|
||||||
|
# define NSH_HAVE_MEMCMDS 1
|
||||||
|
#wendif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Types
|
* Private Types
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef NSH_HAVE_MEMCMDS
|
||||||
struct dbgmem_s
|
struct dbgmem_s
|
||||||
{
|
{
|
||||||
bool dm_write; /* true: perfrom write operation */
|
bool dm_write; /* true: perfrom write operation */
|
||||||
@ -68,18 +75,7 @@ struct dbgmem_s
|
|||||||
uint32_t dm_value; /* Value to write */
|
uint32_t dm_value; /* Value to write */
|
||||||
unsigned int dm_count; /* The number of bytes to access */
|
unsigned int dm_count; /* The number of bytes to access */
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
/****************************************************************************
|
|
||||||
* Private Function Prototypes
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Private Data
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Public Data
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Private Functions
|
* Private Functions
|
||||||
@ -89,8 +85,9 @@ struct dbgmem_s
|
|||||||
* Name: mem_parse
|
* Name: mem_parse
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifdef NSH_HAVE_MEMCMDS
|
||||||
static int mem_parse(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv,
|
static int mem_parse(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv,
|
||||||
struct dbgmem_s *mem)
|
struct dbgmem_s *mem)
|
||||||
{
|
{
|
||||||
char *pcvalue = strchr(argv[1], '=');
|
char *pcvalue = strchr(argv[1], '=');
|
||||||
unsigned long lvalue = 0;
|
unsigned long lvalue = 0;
|
||||||
@ -134,6 +131,7 @@ static int mem_parse(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv,
|
|||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
|
Loading…
Reference in New Issue
Block a user