From 51d3e36ad619492561007b100960eeeeee0fe055 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 5 Mar 2017 14:12:03 -0600 Subject: [PATCH] STM3210E-EVAL: Eliminte a warning. Return type of board_button_irq is now type int. --- configs/stm3210e-eval/src/stm32_pmbuttons.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/configs/stm3210e-eval/src/stm32_pmbuttons.c b/configs/stm3210e-eval/src/stm32_pmbuttons.c index 1ce15bb2a9..8688ec2d49 100644 --- a/configs/stm3210e-eval/src/stm32_pmbuttons.c +++ b/configs/stm3210e-eval/src/stm32_pmbuttons.c @@ -177,22 +177,22 @@ static int button_handler(int irq, FAR void *context, FAR void *arg) void stm32_pmbuttons(void) { +#ifdef CONFIG_ARCH_IRQBUTTONS + int ret; + int i; +#endif + /* Initialize the button GPIOs */ board_button_initialize(); #ifdef CONFIG_ARCH_IRQBUTTONS - int i; for (i = CONFIG_PM_IRQBUTTONS_MIN; i <= CONFIG_PM_IRQBUTTONS_MAX; i++) { - xcpt_t oldhandler = - board_button_irq(i, button_handler, (void*) i); - - if (oldhandler != NULL) + ret = board_button_irq(i, button_handler, (void*)i); + if (ret < 0) { - swarn("WARNING: oldhandler:%p is not NULL! " - "Button events may be lost or aliased!\n", - oldhandler); + serr("ERROR: board_button_irq failed: %d\n", ret); } } #endif