Make type-safe the 'content' field of struct tui_gen_win_info
authorPatrick Palka <patrick@parcs.ath.cx>
Fri, 24 Apr 2015 12:26:50 +0000 (08:26 -0400)
committerPatrick Palka <patrick@parcs.ath.cx>
Tue, 28 Apr 2015 01:19:53 +0000 (21:19 -0400)
commit63ed81829ea8819bc96b288f95230876b0060b14
tree13e7bb1443d4efb3511a469efd9b0bcafdd1d4f5
parentd84f2dd3257a3062637059e4f8a85ee22d94865b
Make type-safe the 'content' field of struct tui_gen_win_info

The 'content' field of struct tui_gen_win_info currently has type
void ** but the field always stores an object of type tui_win_content.
Instead of unnecessarily casting to and from void ** we should just give
the field the type tui_win_content in the first place.

This patch does this and also eliminates all now-redundant casts
involving the 'content' struct field that I could find.

gdb/ChangeLog:

* tui/tui-data.h (struct tui_win_element): Forward-declare.
(tui_win_content): Move declaration.
(struct tui_gen_win_info): Give 'content' field the
type tui_win_content.
* tui/tui-data.c (init_content_element): Remove redundant and
erroneous casts.
(tui_add_content_elements): Remove erroneous cast.
* tui/tui-disasm.c (tui_set_disassem_content): Remove redundant
casts.
(tui_get_begin_asm_address): Likewise.
* tui/tui-regs.c (tui_show_registers): Likewise.
(tui_show_register_group): Likewise.
(tui_display_registers_from): Likewise.
(tui_check_register_values): Likewise.
* tui/tui-source.c (tui_set_source_content): Likewise.
(tui_set_source_content_nil): Likewise.
(tui_source_is_displayed): Likewise.
* tui/tui-stack.c (tui_show_locator_content): Likewise.
(tui_set_locator_fullname): Likewise.
(tui_set_locator_info): Likewise.
(tui_show_frame_info): Likewise.
* tui/tui-winsource.c (tui_clear_source_content): Likewise.
(tui_show_source_line): Likewise.
(tui_horizontal_source_scroll): Likewise.
(tui_update_breakpoint_info): Likewise.
(tui_set_exec_info_content): Likewise.
(tui_show_exec_info_content): Likewise.
(tui_alloc_source_buffer): Likewise.
(tui_line_is_displayed): Likewise.
(tui_addr_is_displayed): Likewise.
gdb/ChangeLog
gdb/tui/tui-data.c
gdb/tui/tui-data.h
gdb/tui/tui-disasm.c
gdb/tui/tui-regs.c
gdb/tui/tui-source.c
gdb/tui/tui-stack.c
gdb/tui/tui-winsource.c
This page took 0.036838 seconds and 4 git commands to generate.