diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-11-25 10:32:54 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-11-25 10:32:54 -0600 |
commit | b756c4b51f51427339bf3649430f8470f64d7a8d (patch) | |
tree | 33df50ce9e2a880b0c892fd49e423bab8ed1d4a5 /apps/examples/buttons | |
parent | 40205b8ce91e12a08e7148670ca09eef74265843 (diff) | |
download | px4-nuttx-b756c4b51f51427339bf3649430f8470f64d7a8d.tar.gz px4-nuttx-b756c4b51f51427339bf3649430f8470f64d7a8d.tar.bz2 px4-nuttx-b756c4b51f51427339bf3649430f8470f64d7a8d.zip |
Fixes for more complaints from cppcheck
Diffstat (limited to 'apps/examples/buttons')
-rw-r--r-- | apps/examples/buttons/buttons_main.c | 6 |
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); |