diff options
author | Tom Tromey <tom@tromey.com> | 2019-06-16 09:56:35 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-06-16 09:59:03 -0600 |
commit | cafb34387d063fa47bc2cdb33fc3fe2f13e6cec0 (patch) | |
tree | 99c29b479d49a6b930509b712b0d960feef00587 /gdb/xcoffread.c | |
parent | 93cb9841d68263174a600dc70af742a8e2eabfc6 (diff) | |
download | gdb-cafb34387d063fa47bc2cdb33fc3fe2f13e6cec0.zip gdb-cafb34387d063fa47bc2cdb33fc3fe2f13e6cec0.tar.gz gdb-cafb34387d063fa47bc2cdb33fc3fe2f13e6cec0.tar.bz2 |
Remove unnecessary casts of NULL
I noticed some unnecessary casts of NULL. This removes all the
unnecessary ones, leaving only ones where we must ensure that NULL has
pointer type for passing through varargs.
I removed a couple of useless casts of 0 that I noticed while writing
this.
Tested by rebuilding.
gdb/ChangeLog
2019-06-16 Tom Tromey <tom@tromey.com>
* valops.c (value_cast, value_slice): Remove unnecessary cast.
* breakpoint.c (stopin_command, stopat_command)
(until_break_command, decode_location_default): Remove unnecessary
cast.
* utils.c (subset_compare): Remove unnecessary cast.
* ada-lang.c (ada_update_initial_language): Remove unnecessary
cast.
* linespec.c (decode_line_with_last_displayed): Remove unnecessary
cast.
* infcmd.c (path_command): Remove unnecessary cast.
* coffread.c (decode_type): Remove unnecessary cast.
* xcoffread.c (read_xcoff_symtab): Remove unnecessary cast.
* mipsread.c (mipscoff_symfile_read): Remove unnecessary cast.
* tui/tui-stack.c (tui_show_locator_content)
(tui_show_frame_info): Remove unnecessary cast.
* tui/tui-win.c (tui_scroll_forward_command)
(tui_scroll_backward_command, tui_set_focus, tui_set_win_height)
(parse_scrolling_args): Remove unnecessary cast.
* tui/tui-data.c (init_win_info, tui_del_window)
(tui_free_window, tui_del_data_windows, tui_free_data_content)
(free_content_elements): Remove unnecessary cast.
* tui/tui-windata.c (tui_first_data_item_displayed): Remove
unnecessary cast.
* tui/tui-source.c (tui_set_source_content)
(tui_vertical_source_scroll): Remove unnecessary cast.
* tui/tui-layout.c (tui_default_win_height): Remove unnecessary
cast.
* tui/tui-io.c (tui_initialize_io): Remove unnecessary cast.
* tui/tui-regs.c (tui_display_registers_from)
(tui_display_register): Remove unnecessary cast.
* tui/tui-wingeneral.c (tui_refresh_win, tui_delete_win)
(tui_unhighlight_win, tui_highlight_win, tui_make_window)
(make_visible): Remove unnecessary cast.
* tui/tui-winsource.c (tui_erase_source_content)
(tui_update_breakpoint_info, tui_set_exec_info_content): Remove
unnecessary cast.
* ax-gdb.c (agent_command_1): Remove unnecessary cast.
* cli/cli-setshow.c (cmd_show_list): Remove unnecessary cast.
* stabsread.c (read_type, read_array_type, read_range_type):
Remove unnecessary cast.
* mdebugread.c (mdebug_build_psymtabs): Remove unnecessary cast.
(parse_symbol, parse_type, upgrade_type, parse_external)
(parse_partial_symbols, psymtab_to_symtab_1, cross_ref): Remove
unnecessary cast.
* gdb_bfd.c (gdb_bfd_map_section): Remove unnecessary cast.
Diffstat (limited to 'gdb/xcoffread.c')
-rw-r--r-- | gdb/xcoffread.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c index 215645d..f4892a8 100644 --- a/gdb/xcoffread.c +++ b/gdb/xcoffread.c @@ -1045,7 +1045,7 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst) pst_symtab_language = deduce_language_from_filename (filestring); start_stabs (); - start_symtab (objfile, filestring, (char *) NULL, file_start_addr, + start_symtab (objfile, filestring, NULL, file_start_addr, pst_symtab_language); record_debugformat (debugfmt); symnum = ((struct symloc *) pst->read_symtab_private)->first_symnum; @@ -1139,8 +1139,8 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst) } start_stabs (); - start_symtab (objfile, "_globals_", (char *) NULL, - (CORE_ADDR) 0, pst_symtab_language); + start_symtab (objfile, "_globals_", NULL, + 0, pst_symtab_language); record_debugformat (debugfmt); cur_src_end_addr = first_object_file_end; /* Done with all files, everything from here on is globals. */ @@ -1230,7 +1230,7 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst) /* Give all csects for this source file the same name. */ start_symtab (objfile, filestring, NULL, - (CORE_ADDR) 0, pst_symtab_language); + 0, pst_symtab_language); record_debugformat (debugfmt); } @@ -1350,8 +1350,7 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst) filestring = cs->c_name; start_stabs (); - start_symtab (objfile, filestring, (char *) NULL, (CORE_ADDR) 0, - pst_symtab_language); + start_symtab (objfile, filestring, NULL, 0, pst_symtab_language); record_debugformat (debugfmt); last_csect_name = 0; |