summaryrefslogtreecommitdiff
path: root/apps/examples/buttons
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-11-25 10:32:54 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-11-25 10:32:54 -0600
commitb756c4b51f51427339bf3649430f8470f64d7a8d (patch)
tree33df50ce9e2a880b0c892fd49e423bab8ed1d4a5 /apps/examples/buttons
parent40205b8ce91e12a08e7148670ca09eef74265843 (diff)
downloadnuttx-b756c4b51f51427339bf3649430f8470f64d7a8d.tar.gz
nuttx-b756c4b51f51427339bf3649430f8470f64d7a8d.tar.bz2
nuttx-b756c4b51f51427339bf3649430f8470f64d7a8d.zip
Fixes for more complaints from cppcheck
Diffstat (limited to 'apps/examples/buttons')
-rw-r--r--apps/examples/buttons/buttons_main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/examples/buttons/buttons_main.c b/apps/examples/buttons/buttons_main.c
index a76c173a2..e971d1c30 100644
--- a/apps/examples/buttons/buttons_main.c
+++ b/apps/examples/buttons/buttons_main.c
@@ -404,7 +404,9 @@ int buttons_main(int argc, char *argv[])
{
uint8_t newset;
irqstate_t flags;
+#ifdef CONFIG_ARCH_IRQBUTTONS
int i;
+#endif
/* If this example is configured as an NX add-on, then limit the number of
* samples that we collect before returning. Otherwise, we never return
@@ -425,7 +427,7 @@ int buttons_main(int argc, char *argv[])
board_button_initialize();
- /* Register to recieve button interrupts */
+ /* Register to receive button interrupts */
#ifdef CONFIG_ARCH_IRQBUTTONS
for (i = CONFIG_EXAMPLES_IRQBUTTONS_MIN; i <= CONFIG_EXAMPLES_IRQBUTTONS_MAX; i++)
@@ -496,7 +498,7 @@ int buttons_main(int argc, char *argv[])
/* Un-register button handlers */
-#if defined(CONFIG_ARCH_IRQBUTTONS) && defined(CONFIG_NSH_BUILTIN_APPS)
+#ifdef CONFIG_ARCH_IRQBUTTONS
for (i = CONFIG_EXAMPLES_IRQBUTTONS_MIN; i <= CONFIG_EXAMPLES_IRQBUTTONS_MAX; i++)
{
(void)board_button_irq(i, NULL);