diff options
| author | Paul Eggert | 2013-08-10 18:30:20 -0700 |
|---|---|---|
| committer | Paul Eggert | 2013-08-10 18:30:20 -0700 |
| commit | 7d652d97681c4f1b67018f44f64c619ef5edd990 (patch) | |
| tree | a9d8ac72718b53f60ddd3e7cbca7180b5796b79e /src/scroll.c | |
| parent | 9a4ebc748797acc8af74f561367aa1b34ca02d2e (diff) | |
| download | emacs-7d652d97681c4f1b67018f44f64c619ef5edd990.tar.gz emacs-7d652d97681c4f1b67018f44f64c619ef5edd990.zip | |
Omit some unnecessary casts.
Many of these go back to the old pre-C89 days, when they may have
been needed, but we've been assuming C89 or later for a while now.
* alloc.c (live_string_p, live_cons_p, live_symbol_p)
(live_float_p, live_misc_p, live_vector_p):
* buffer.c (compare_overlays, cmp_for_strings, mmap_find)
(mmap_alloc, alloc_buffer_text, enlarge_buffer_text)
(defvar_per_buffer):
* callint.c (Fcall_interactively):
* doc.c (Fsubstitute_command_keys):
* filelock.c (get_boot_time):
* frame.c (xrdb_get_resource):
* gtkutil.c (hierarchy_ch_cb, qttip_cb, style_changed_cb)
(delete_cb, xg_dialog_response_cb, xg_maybe_add_timer)
(xg_get_file_name_from_selector, menuitem_destroy_callback)
(menuitem_highlight_callback, menu_destroy_callback)
(xg_update_menu_item, xg_modify_menubar_widgets, menubar_map_cb)
(xg_tool_bar_callback, xg_get_tool_bar_widgets)
(xg_tool_bar_detach_callback, xg_tool_bar_attach_callback)
(xg_tool_bar_help_callback, tb_size_cb):
* image.c (xpm_alloc_color, png_read_from_memory)
(png_read_from_file, png_load_body, our_memory_skip_input_data)
(jpeg_memory_src, jpeg_file_src, imagemagick_load_image)
(syms_of_image):
* keymap.c (describe_map):
* nsfns.m (Fns_display_monitor_attributes_list):
* nsmenu.m (process_dialog:):
* nsterm.m (hold_event):
* process.c (wait_reading_process_output):
* regex.c (REGEX_REALLOCATE, re_set_registers, re_exec, regexec):
* scroll.c (do_direct_scrolling, scrolling_1):
* termcap.c (tgetent):
* window.c (check_window_containing, add_window_to_list)
(freeze_window_starts):
* xdisp.c (compare_overlay_entries, vmessage):
* xfns.c (x_window, x_get_monitor_attributes_xinerama)
(x_get_monitor_attributes_xrandr)
(Fx_display_monitor_attributes_list, x_display_info_for_name)
(Fx_open_connection, file_dialog_cb, file_dialog_unmap_cb):
* xfont.c (xfont_match, xfont_open):
* xmenu.c (x_menu_wait_for_event, menu_highlight_callback)
(menubar_selection_callback, menu_position_func)
(popup_selection_callback, create_and_show_popup_menu)
(dialog_selection_callback, create_and_show_dialog):
* xrdb.c (x_get_string_resource):
(main) [TESTRM]:
* xsmfns.c (x_session_check_input):
* xterm.c (x_draw_glyphless_glyph_string_foreground)
(xm_scroll_callback, xg_scroll_callback, xg_end_scroll_callback)
(xaw_jump_callback, xaw_scroll_callback):
Omit unnecessary casts.
Diffstat (limited to 'src/scroll.c')
| -rw-r--r-- | src/scroll.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/scroll.c b/src/scroll.c index 3e296068e8f..b9ed8c04ba8 100644 --- a/src/scroll.c +++ b/src/scroll.c | |||
| @@ -652,8 +652,7 @@ do_direct_scrolling (struct frame *frame, struct glyph_matrix *current_matrix, | |||
| 652 | 652 | ||
| 653 | /* A queue of deletions and insertions to be performed. */ | 653 | /* A queue of deletions and insertions to be performed. */ |
| 654 | struct alt_queue { int count, pos, window; }; | 654 | struct alt_queue { int count, pos, window; }; |
| 655 | struct alt_queue *queue_start = (struct alt_queue *) | 655 | struct alt_queue *queue_start = alloca (window_size * sizeof *queue_start); |
| 656 | alloca (window_size * sizeof *queue_start); | ||
| 657 | struct alt_queue *queue = queue_start; | 656 | struct alt_queue *queue = queue_start; |
| 658 | 657 | ||
| 659 | /* True if a terminal window has been set with set_terminal_window. */ | 658 | /* True if a terminal window has been set with set_terminal_window. */ |
| @@ -797,9 +796,8 @@ scrolling_1 (struct frame *frame, int window_size, int unchanged_at_top, | |||
| 797 | int unchanged_at_bottom, int *draw_cost, int *old_draw_cost, | 796 | int unchanged_at_bottom, int *draw_cost, int *old_draw_cost, |
| 798 | int *old_hash, int *new_hash, int free_at_end) | 797 | int *old_hash, int *new_hash, int free_at_end) |
| 799 | { | 798 | { |
| 800 | struct matrix_elt *matrix; | 799 | struct matrix_elt *matrix |
| 801 | matrix = ((struct matrix_elt *) | 800 | = alloca ((window_size + 1) * (window_size + 1) * sizeof *matrix); |
| 802 | alloca ((window_size + 1) * (window_size + 1) * sizeof *matrix)); | ||
| 803 | 801 | ||
| 804 | if (FRAME_SCROLL_REGION_OK (frame)) | 802 | if (FRAME_SCROLL_REGION_OK (frame)) |
| 805 | { | 803 | { |