On Tue, Dec 27, 2022 at 02:19:53AM +0100, Jeremie Courreges-Anglas wrote:
> 
> 
> /usr/src/gnu/usr.bin/binutils/gdb/tui/tui-stack.c:359:16: error: incompatible 
> integer to pointer conversion passing 'CORE_ADDR' (aka 'unsigned long') to 
> parameter of type 'CORE_ADDR *' (aka 'unsigned long *') [-Wint-conversion]
>                                             &low, (CORE_ADDR) NULL) == 0)
>                                                   ^~~~~~~~~~~~~~~~
> /usr/src/gnu/usr.bin/binutils/gdb/symtab.h:1084:21: note: passing argument to 
> parameter here
>                                      CORE_ADDR *);
>                                                     ^
> 
> The code wants a pointer to a "CORE_ADDR", thus the "(CORE_ADDR)" cast
> is erroneous.  Just pass NULL.  ok?

ok jsg@

> 
> 
> Index: gnu/usr.bin/binutils/gdb/tui/tui-stack.c
> ===================================================================
> RCS file: /home/cvs/src/gnu/usr.bin/binutils/gdb/tui/tui-stack.c,v
> retrieving revision 1.1.1.1
> diff -u -p -r1.1.1.1 tui-stack.c
> --- gnu/usr.bin/binutils/gdb/tui/tui-stack.c  21 May 2004 19:15:20 -0000      
> 1.1.1.1
> +++ gnu/usr.bin/binutils/gdb/tui/tui-stack.c  27 Dec 2022 01:15:51 -0000
> @@ -356,7 +356,7 @@ tui_show_frame_info (struct frame_info *
>         else
>           {
>             if (find_pc_partial_function (get_frame_pc (fi), (char **) NULL,
> -                                         &low, (CORE_ADDR) NULL) == 0)
> +                                         &low, NULL) == 0)
>               error ("No function contains program counter for selected 
> frame.\n");
>             else
>               low = tui_get_low_disassembly_address (low, get_frame_pc (fi));
> 
> -- 
> jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE
> 
> 

Reply via email to