[PATCH] BSP: Fix warning when BSP_INTERRUPT_VECTOR_MIN is 0

Gedare Bloom gedare at rtems.org
Thu May 2 16:07:53 UTC 2013


Hi Andreas,

What is the compiler warning that this patch fixes?

-Gedare

On Thu, May 2, 2013 at 12:02 PM, Gedare Bloom <gedare at rtems.org> wrote:
> From: Andreas Heinig <andreas.heinig at cs.tu-dortmund.de>
>
> ---
>  c/src/lib/libbsp/shared/include/irq-generic.h |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/c/src/lib/libbsp/shared/include/irq-generic.h b/c/src/lib/libbsp/shared/include/irq-generic.h
> index d365c0c..386032b 100644
> --- a/c/src/lib/libbsp/shared/include/irq-generic.h
> +++ b/c/src/lib/libbsp/shared/include/irq-generic.h
> @@ -144,8 +144,12 @@ static inline rtems_vector_number bsp_interrupt_handler_index(
>     */
>    static inline bool bsp_interrupt_is_valid_vector(rtems_vector_number vector)
>    {
> +#if BSP_INTERRUPT_VECTOR_MIN > 0
>      return (rtems_vector_number) BSP_INTERRUPT_VECTOR_MIN <= vector
>        && vector <= (rtems_vector_number) BSP_INTERRUPT_VECTOR_MAX;
> +#else
> +    return vector <= (rtems_vector_number) BSP_INTERRUPT_VECTOR_MAX;
> +#endif
>    }
>  #endif
>
> --
> 1.7.1
>



More information about the devel mailing list