[rtems commit] genmcf548x/irq/irq.c: Fix incompatible pointer warning

Gedare Bloom gedare at rtems.org
Wed Apr 26 00:19:17 UTC 2017


On Mon, Apr 24, 2017 at 6:21 PM, Joel Sherrill <joel at rtems.org> wrote:
> Module:    rtems
> Branch:    master
> Commit:    485222e633da85047daa1dafd1732b2b4750e933
> Changeset: http://git.rtems.org/rtems/commit/?id=485222e633da85047daa1dafd1732b2b4750e933
>
> Author:    Joel Sherrill <joel at rtems.org>
> Date:      Mon Apr 24 12:00:15 2017 -0500
>
> genmcf548x/irq/irq.c: Fix incompatible pointer warning
>
> ---
>
>  c/src/lib/libbsp/m68k/genmcf548x/irq/irq.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/c/src/lib/libbsp/m68k/genmcf548x/irq/irq.c b/c/src/lib/libbsp/m68k/genmcf548x/irq/irq.c
> index 47a155a..58e9044 100644
> --- a/c/src/lib/libbsp/m68k/genmcf548x/irq/irq.c
> +++ b/c/src/lib/libbsp/m68k/genmcf548x/irq/irq.c
> @@ -99,18 +99,24 @@ rtems_status_code bsp_interrupt_vector_disable(rtems_vector_number vector)
>
>  static void_func get_exception_handler(rtems_vector_number vector)
>  {
> +  void **vbr;
>    void_func *exception_table;
>
> -  m68k_get_vbr(exception_table);
> +  m68k_get_vbr(vbr);
> +
> +  exception_table = (void_func *)vbr;
>
This looks strange. Can you achieve a similar effect with
m68k_get_vbr( (void*)exception_table );

>    return exception_table[vector_to_exception_vector(vector)];
>  }
>
>  static void set_exception_handler(rtems_vector_number vector, void_func handler)
>  {
> +  void **vbr;
>    void_func *exception_table;
>
> -  m68k_get_vbr(exception_table);
> +  m68k_get_vbr(vbr);
> +
> +  exception_table = (void_func *)vbr;
>
>    exception_table[vector_to_exception_vector(vector)] = handler;
>  }
>
> _______________________________________________
> vc mailing list
> vc at rtems.org
> http://lists.rtems.org/mailman/listinfo/vc


More information about the devel mailing list