diff options
| author | Paul Eggert | 2011-03-10 23:24:21 -0800 |
|---|---|---|
| committer | Paul Eggert | 2011-03-10 23:24:21 -0800 |
| commit | 1714f52b9d0e0bbb01a177d6f1383c5cb665ccdb (patch) | |
| tree | a019c0fdec066886d1dba7dc50b90b2f9f3fad63 /src/ChangeLog | |
| parent | 135e287cda9508d7fa0e33b7d8af00ede1249cb5 (diff) | |
| parent | 83316bf4044b5fca98f19daae8f16a646b7e83e9 (diff) | |
| download | emacs-1714f52b9d0e0bbb01a177d6f1383c5cb665ccdb.tar.gz emacs-1714f52b9d0e0bbb01a177d6f1383c5cb665ccdb.zip | |
Fix some minor problems found by GCC 4.5.2's static checks.
Diffstat (limited to 'src/ChangeLog')
| -rw-r--r-- | src/ChangeLog | 186 |
1 files changed, 186 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index c4af193d1b0..3a6b09dfb1f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,189 @@ | |||
| 1 | 2011-03-11 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Fix some minor problems found by GCC 4.5.2's static checks. | ||
| 4 | |||
| 5 | * fringe.c (update_window_fringes): Mark locals as initialized | ||
| 6 | (Bug#8227). | ||
| 7 | (destroy_fringe_bitmap, init_fringe_bitmap): Now static. | ||
| 8 | |||
| 9 | * alloc.c (mark_fringe_data): Move decl from here ... | ||
| 10 | * lisp.h (mark_fringe_data) [HAVE_WINDOW_SYSTEM]: ... to here, | ||
| 11 | to check its interface. | ||
| 12 | (init_fringe_once): Do not declare unless HAVE_WINDOW_SYSTEM. | ||
| 13 | |||
| 14 | * fontset.c (free_realized_fontset): Now static. | ||
| 15 | (Fset_fontset_font): Rename local to avoid shadowing. | ||
| 16 | (fontset_font): Mark local as initialized. | ||
| 17 | (FONTSET_SPEC, FONTSET_REPERTORY, RFONT_DEF_REPERTORY): Remove; unused. | ||
| 18 | |||
| 19 | * xrdb.c: Include "xterm.h", to check x_load_resources's interface. | ||
| 20 | |||
| 21 | * xselect.c (x_disown_buffer_selections): Remove; not used. | ||
| 22 | (TRACE3) [!defined TRACE_SELECTION]: Remove; not used. | ||
| 23 | (x_own_selection, Fx_disown_selection_internal): Rename locals | ||
| 24 | to avoid shadowing. | ||
| 25 | (x_handle_dnd_message): Remove local to avoid shadowing. | ||
| 26 | |||
| 27 | * lisp.h (GCPRO1_VAR, UNGCPRO_VAR): New macros, | ||
| 28 | so that the caller can use some name other than gcpro1. | ||
| 29 | (GCPRO1, UNGCPRO): Reimplement in terms of the new macros. | ||
| 30 | * xfns.c (Fx_create_frame, x_create_tip_frame, Fx_show_tip): | ||
| 31 | (Fx_backspace_delete_keys_p): | ||
| 32 | Use them to avoid shadowing, and rename vars to avoid shadowing. | ||
| 33 | (x_decode_color, x_set_name, x_window): Now static. | ||
| 34 | (Fx_create_frame): Add braces to silence GCC warning. | ||
| 35 | (Fx_file_dialog, Fx_select_font): Fix pointer signedness. | ||
| 36 | (x_real_positions, xg_set_icon_from_xpm_data, x_create_tip_frame): | ||
| 37 | Remove unused locals. | ||
| 38 | (Fx_create_frame, x_create_tip_frame, Fx_show_tip): | ||
| 39 | (Fx_backspace_delete_keys_p): Rename locals to avoid shadowing. | ||
| 40 | Some of these renamings use the new GCPRO1_VAR and UNGCPRO_VAR | ||
| 41 | macros. | ||
| 42 | |||
| 43 | * xterm.h (x_mouse_leave): New decl. | ||
| 44 | |||
| 45 | * xterm.c (x_copy_dpy_color, x_focus_on_frame, x_unfocus_frame): | ||
| 46 | Remove unused functions. | ||
| 47 | (x_shift_glyphs_for_insert, XTflash, XTring_bell): | ||
| 48 | (x_calc_absolute_position): Now static. | ||
| 49 | (XTread_socket): Don't define label "out" unless it's used. | ||
| 50 | Don't declare local "event" unless it's used. | ||
| 51 | (x_iconify_frame, x_free_frame_resources): Don't declare locals | ||
| 52 | unless they are used. | ||
| 53 | (XEMBED_VERSION, xembed_set_info): Don't define unless needed. | ||
| 54 | (x_fatal_error_signal): Remove; not used. | ||
| 55 | (x_draw_image_foreground, redo_mouse_highlight, XTmouse_position): | ||
| 56 | (x_scroll_bar_report_motion, handle_one_xevent, x_draw_bar_cursor): | ||
| 57 | (x_error_catcher, x_connection_closed, x_error_handler): | ||
| 58 | (x_error_quitter, xembed_send_message, x_iconify_frame): | ||
| 59 | (my_log_handler): Rename locals to avoid shadowing. | ||
| 60 | (x_delete_glyphs, x_ins_del_lines): Mark with NO_RETURN. | ||
| 61 | (x_connection_closed): Tell GCC not to suggest NO_RETURN. | ||
| 62 | |||
| 63 | * xfaces.c (clear_face_cache, Fx_list_fonts, Fface_font): Rename | ||
| 64 | or move locals to avoid shadowing. | ||
| 65 | (tty_defined_color, merge_face_heights): Now static. | ||
| 66 | (free_realized_faces_for_fontset): Remove; not used. | ||
| 67 | (Fx_list_fonts): Mark variable that gcc -Wuninitialized | ||
| 68 | does not deduce is never used uninitialized. | ||
| 69 | (STRDUPA, LSTRDUPA, FONT_POINT_SIZE_QUANTUM): Remove; not used. | ||
| 70 | (LFACEP): Define only if XASSERTS, as it's not needed otherwise. | ||
| 71 | |||
| 72 | * terminal.c (store_terminal_param): Now static. | ||
| 73 | |||
| 74 | * xmenu.c (menu_highlight_callback): Now static. | ||
| 75 | (set_frame_menubar): Remove unused local. | ||
| 76 | (xmenu_show): Rename parameter to avoid shadowing. | ||
| 77 | (xmenu_show, xdialog_show, xmenu_show): Make local pointers "const" | ||
| 78 | since they might point to immutable storage. | ||
| 79 | (next_menubar_widget_id): Declare only if USE_X_TOOLKIT, | ||
| 80 | since it's unused otherwise. | ||
| 81 | |||
| 82 | * xdisp.c (produce_glyphless_glyph): Initialize lower_xoff. | ||
| 83 | Add a FIXME, since the code still doesn't look right. (Bug#8215) | ||
| 84 | (Fcurrent_bidi_paragraph_direction): Simplify slightly; this | ||
| 85 | avoids a gcc -Wuninitialized diagnostic. | ||
| 86 | (display_line, BUILD_COMPOSITE_GLYPH_STRING, draw_glyphs): | ||
| 87 | (note_mouse_highlight): Mark variables that gcc -Wuninitialized | ||
| 88 | does not deduce are never used uninitialized. | ||
| 89 | |||
| 90 | * lisp.h (IF_LINT): New macro, copied from ../lib-src/emacsclient.c. | ||
| 91 | |||
| 92 | * xdisp.c (redisplay_window): Rename local to avoid shadowing. | ||
| 93 | * window.c (window_loop, size_window): | ||
| 94 | (run_window_configuration_change_hook, enlarge_window): Likewise. | ||
| 95 | |||
| 96 | * window.c (display_buffer): Now static. | ||
| 97 | (size_window): Mark variables that gcc -Wuninitialized | ||
| 98 | does not deduce are never used uninitialized. | ||
| 99 | * window.h (check_all_windows): New decl, to forestall | ||
| 100 | gcc -Wmissing-prototypes diagnostic. | ||
| 101 | * dispextern.h (bidi_dump_cached_states): Likewise. | ||
| 102 | |||
| 103 | * charset.h (CHECK_CHARSET_GET_CHARSET): Rename locals to avoid | ||
| 104 | shadowing. | ||
| 105 | * charset.c (map_charset_for_dump, Fchar_charset): Likewise. | ||
| 106 | Include <limits.h>. | ||
| 107 | (Fsort_charsets): Redo min/max calculation to shorten the code a bit | ||
| 108 | and to avoid gcc -Wuninitialized warning. | ||
| 109 | (load_charset_map): Mark variables that gcc -Wuninitialized | ||
| 110 | does not deduce are never used uninitialized. | ||
| 111 | (load_charset): Abort instead of using uninitialized var (Bug#8229). | ||
| 112 | |||
| 113 | * coding.c (coding_set_source, coding_set_destination): | ||
| 114 | Use "else { /* comment */ }" rather than "else /* comment */;" | ||
| 115 | for clarity, and to avoid gcc -Wempty-body warning. | ||
| 116 | (Fdefine_coding_system_internal): Don't redeclare 'i' inside | ||
| 117 | a block, when the outer 'i' will do. | ||
| 118 | (decode_coding_utf_8, decode_coding_utf_16, detect_coding_emacs_mule): | ||
| 119 | (emacs_mule_char, decode_coding_emacs_mule, detect_coding_iso_2022): | ||
| 120 | (decode_coding_iso_2022, decode_coding_sjis, decode_coding_big5): | ||
| 121 | (decode_coding_raw_text, decode_coding_charset, get_translation_table): | ||
| 122 | (Fdecode_sjis_char, Fdefine_coding_system_internal): | ||
| 123 | Rename locals to avoid shadowing. | ||
| 124 | * character.h (FETCH_STRING_CHAR_ADVANCE): Likewise. | ||
| 125 | * coding.c (emacs_mule_char, encode_invocation_designation): | ||
| 126 | Now static, since they're not used elsewhere. | ||
| 127 | (decode_coding_iso_2022): Add "default: abort ();" as a safety check. | ||
| 128 | (decode_coding_object, encode_coding_object, detect_coding_system): | ||
| 129 | (decode_coding_emacs_mule): Mark variables that gcc | ||
| 130 | -Wuninitialized does not deduce are never used uninitialized. | ||
| 131 | (detect_coding_iso_2022): Initialize a local variable that might | ||
| 132 | be used uninitialized. Leave a FIXME because it's not clear that | ||
| 133 | this initialization is needed. (Bug#8211) | ||
| 134 | (ISO_CODE_LF, ISO_CODE_CR, CODING_ISO_FLAG_EUC_TW_SHIFT): | ||
| 135 | (ONE_MORE_BYTE_NO_CHECK, UTF_BOM, UTF_16_INVALID_P): | ||
| 136 | (SHIFT_OUT_OK, ENCODE_CONTROL_SEQUENCE_INTRODUCER): | ||
| 137 | (ENCODE_DIRECTION_R2L, ENCODE_DIRECTION_L2R): | ||
| 138 | Remove unused macros. | ||
| 139 | |||
| 140 | * category.c (hash_get_category_set): Remove unused local var. | ||
| 141 | (copy_category_table): Now static, since it's not used elsewhere. | ||
| 142 | * character.c (string_count_byte8): Likewise. | ||
| 143 | |||
| 144 | * ccl.c (CCL_WRITE_STRING, CCL_ENCODE_CHAR, Fccl_execute_on_string): | ||
| 145 | (Fregister_code_conversion_map): Rename locals to avoid shadowing. | ||
| 146 | |||
| 147 | * chartab.c (copy_sub_char_table): Now static, since it's not used | ||
| 148 | elsewhere. | ||
| 149 | (sub_char_table_ref_and_range, char_table_ref_and_range): | ||
| 150 | Rename locals to avoid shadowing. | ||
| 151 | (ASET_RANGE, GET_SUB_CHAR_TABLE): Remove unused macros. | ||
| 152 | |||
| 153 | * bidi.c (bidi_check_type): Now static, since it's not used elsewhere. | ||
| 154 | (BIDI_BOB): Remove unused macro. | ||
| 155 | |||
| 156 | * cm.c (cmgoto): Mark variables that gcc -Wuninitialized does not | ||
| 157 | deduce are never used uninitialized. | ||
| 158 | * term.c (encode_terminal_code): Likewise. | ||
| 159 | |||
| 160 | * term.c (encode_terminal_code): Now static. Remove unused local. | ||
| 161 | |||
| 162 | * tparam.h: New file. | ||
| 163 | * term.c, tparam.h: Include it. | ||
| 164 | * deps.mk (term.o, tparam.o): Depend on tparam.h. | ||
| 165 | * term.c (tputs, tgetent, tgetflag, tgetnum, tparam, tgetstr): | ||
| 166 | Move these decls to tparam.h, and make them agree with what | ||
| 167 | is actually in tparam.c. The previous trick of using incompatible | ||
| 168 | decls in different modules does not conform to the C standard. | ||
| 169 | All callers of tparam changed to use tparam's actual API. | ||
| 170 | * tparam.c (tparam1, tparam, tgoto): | ||
| 171 | Use const pointers where appropriate. | ||
| 172 | |||
| 173 | * cm.c (calccost, cmgoto): Use const pointers where appropriate. | ||
| 174 | * cm.h (struct cm): Likewise. | ||
| 175 | * dispextern.h (do_line_insertion_deletion_costs): Likewise. | ||
| 176 | * scroll.c (ins_del_costs, do_line_insertion_deletion_costs): Likewise. | ||
| 177 | * term.c (tty_ins_del_lines, calculate_costs, struct fkey_table): | ||
| 178 | (term_get_fkeys_1, append_glyphless_glyph, produce_glyphless_glyph): | ||
| 179 | (turn_on_face, init_tty): Likewise. | ||
| 180 | * termchar.h (struct tty_display_info): Likewise. | ||
| 181 | |||
| 182 | * term.c (term_mouse_position): Rename local to avoid shadowing. | ||
| 183 | |||
| 184 | * alloc.c (mark_ttys): Move decl from here ... | ||
| 185 | * lisp.h (mark_ttys): ... to here, so that it's checked against defn. | ||
| 186 | |||
| 1 | 2011-03-11 Andreas Schwab <schwab@linux-m68k.org> | 187 | 2011-03-11 Andreas Schwab <schwab@linux-m68k.org> |
| 2 | 188 | ||
| 3 | * .gdbinit (pwinx, xbuffer): Fix access to buffer name. | 189 | * .gdbinit (pwinx, xbuffer): Fix access to buffer name. |