diff options
Diffstat (limited to 'src/ChangeLog')
| -rw-r--r-- | src/ChangeLog | 164 |
1 files changed, 164 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index d12969fe46a..8a2e2396d74 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,167 @@ | |||
| 1 | 2011-04-06 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Fix more problems found by GCC 4.6.0's static checks. | ||
| 4 | |||
| 5 | * xmenu.c (Fx_popup_dialog): Don't assume string is free of formats. | ||
| 6 | |||
| 7 | * menu.c (Fx_popup_menu): Don't assume error_name lacks printf formats. | ||
| 8 | |||
| 9 | * lisp.h (message, message_nolog, fatal): Mark as printf-like. | ||
| 10 | |||
| 11 | * xdisp.c (vmessage): Mark as a printf-like function. | ||
| 12 | |||
| 13 | * term.c (vfatal, maybe_fatal): Mark as printf-like functions. | ||
| 14 | |||
| 15 | * sound.c (sound_warning): Don't crash if arg contains a printf format. | ||
| 16 | |||
| 17 | * image.c (tiff_error_handler, tiff_warning_handler): Mark as | ||
| 18 | printf-like functions. | ||
| 19 | (tiff_load): Add casts to remove these marks before passing them | ||
| 20 | to system-supplied API. | ||
| 21 | |||
| 22 | * eval.c (Fsignal): Remove excess argument to 'fatal'. | ||
| 23 | |||
| 24 | * coding.c (EMIT_ONE_BYTE, EMIT_TWO_BYTES): Use unsigned, not int. | ||
| 25 | This avoids several warnings with gcc -Wstrict-overflow. | ||
| 26 | (DECODE_COMPOSITION_RULE): If the rule is invalid, goto invalid_code | ||
| 27 | directly, rather than having caller test rule sign. This avoids | ||
| 28 | some unnecessary tests. | ||
| 29 | * composite.h (COMPOSITION_ENCODE_RULE_VALID): New macro. | ||
| 30 | (COMPOSITION_ENCODE_RULE): Arguments now must be valid. This | ||
| 31 | affects only one use, in DECODE_COMPOSITION_RULE, which is changed. | ||
| 32 | |||
| 33 | * xfont.c (xfont_text_extents): Remove var that was set but not used. | ||
| 34 | (xfont_open): Avoid unnecessary tests. | ||
| 35 | |||
| 36 | * composite.c (composition_gstring_put_cache): Use unsigned integer. | ||
| 37 | |||
| 38 | * composite.h, composite.c (composition_gstring_put_cache): | ||
| 39 | Use EMACS_INT, not int, for length. | ||
| 40 | |||
| 41 | * composite.h (COMPOSITION_DECODE_REFS): New macro, | ||
| 42 | breaking out part of COMPOSITION_DECODE_RULE. | ||
| 43 | (COMPOSITION_DECODE_RULE): Use it. | ||
| 44 | * composite.c (get_composition_id): Remove unused local vars, | ||
| 45 | by using the new macro. | ||
| 46 | |||
| 47 | * textprop.c (set_text_properties_1): Change while to do-while, | ||
| 48 | since the condition is always true at first. | ||
| 49 | |||
| 50 | * intervals.c (graft_intervals_into_buffer): Mark var as used. | ||
| 51 | (interval_deletion_adjustment): Return unsigned value. | ||
| 52 | All uses changed. | ||
| 53 | |||
| 54 | * process.c (list_processes_1, create_pty, read_process_output): | ||
| 55 | (exec_sentinel): Remove vars that were set but not used. | ||
| 56 | (create_pty): Remove unnecessary "volatile"s. | ||
| 57 | (Fnetwork_interface_info): Avoid possibility of int overflow. | ||
| 58 | (read_process_output): Do adaptive read buffering even if carryover. | ||
| 59 | (read_process_output): Simplify nbytes computation if buffered. | ||
| 60 | |||
| 61 | * bytecode.c (exec_byte_code): Rename local to avoid shadowing. | ||
| 62 | |||
| 63 | * syntax.c (scan_words): Remove var that was set but not used. | ||
| 64 | (update_syntax_table): Use unsigned instead of int. | ||
| 65 | |||
| 66 | * lread.c (lisp_file_lexically_bound_p): Use ints rather than endptrs. | ||
| 67 | (lisp_file_lexically_bound_p, read1): Use unsigned instead of int. | ||
| 68 | (safe_to_load_p): Make the end-of-loop test the inverse of the in-loop. | ||
| 69 | |||
| 70 | * print.c (print_error_message): Avoid int overflow. | ||
| 71 | |||
| 72 | * font.c (font_list_entities): Redo for clarity, | ||
| 73 | so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX. | ||
| 74 | |||
| 75 | * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars. | ||
| 76 | (font_score): Avoid potential overflow in diff calculation. | ||
| 77 | |||
| 78 | * fns.c (substring_both): Remove var that is set but not used. | ||
| 79 | (sxhash): Redo loop for clarity and to avoid wraparound warning. | ||
| 80 | |||
| 81 | * eval.c (funcall_lambda): Rename local to avoid shadowing. | ||
| 82 | |||
| 83 | * alloc.c (mark_object_loop_halt, mark_object): Use size_t, not int. | ||
| 84 | Otherwise, GCC 4.6.0 optimizes the loop check away since the check | ||
| 85 | can always succeed if overflow has undefined behavior. | ||
| 86 | |||
| 87 | * search.c (boyer_moore, wordify): Remove vars set but not used. | ||
| 88 | (wordify): Omit three unnecessary tests. | ||
| 89 | |||
| 90 | * indent.c (MULTIBYTE_BYTES_WIDTH): Don't compute wide_column. | ||
| 91 | All callers changed. This avoids the need for an unused var. | ||
| 92 | |||
| 93 | * casefiddle.c (casify_region): Remove var that is set but not used. | ||
| 94 | |||
| 95 | * dired.c (file_name_completion): Remove var that is set but not used. | ||
| 96 | |||
| 97 | * fileio.c (Finsert_file_contents): Make EOF condition clearer. | ||
| 98 | |||
| 99 | * fileio.c (Finsert_file_contents): Avoid signed integer overflow. | ||
| 100 | (Finsert_file_contents): Remove unnecessary code checking fd. | ||
| 101 | |||
| 102 | * minibuf.c (read_minibuf_noninteractive): Use size_t for sizes. | ||
| 103 | Check for integer overflow on size calculations. | ||
| 104 | |||
| 105 | * buffer.c (Fprevious_overlay_change): Remove var that is set | ||
| 106 | but not used. | ||
| 107 | |||
| 108 | * keyboard.c (menu_bar_items, read_char_minibuf_menu_prompt): | ||
| 109 | Remove vars that are set but not used. | ||
| 110 | (timer_check_2): Don't assume timer-list and idle-timer-list are lists. | ||
| 111 | (timer_check_2): Mark vars as initialized. | ||
| 112 | |||
| 113 | * gtkutil.c (xg_get_file_with_chooser): Mark var as initialized. | ||
| 114 | |||
| 115 | * image.c (lookup_image): Remove var that is set but not used. | ||
| 116 | (xbm_load): Use parse_p, for gcc -Werror=unused-but-set-variable. | ||
| 117 | |||
| 118 | * fontset.c (Finternal_char_font, Ffontset_info): Remove vars | ||
| 119 | that are set but not used. | ||
| 120 | |||
| 121 | * xfns.c (make_invisible_cursor): Don't return garbage | ||
| 122 | if XCreateBitmapFromData fails (Bug#8410). | ||
| 123 | |||
| 124 | * xselect.c (x_get_local_selection, x_handle_property_notify): | ||
| 125 | Remove vars that are set but not used. | ||
| 126 | |||
| 127 | * xfns.c (x_create_tip_frame): Remove var that is set but not used. | ||
| 128 | (make_invisible_cursor): Initialize a possibly-uninitialized variable. | ||
| 129 | |||
| 130 | * xterm.c (x_scroll_bar_to_input_event) [!USE_GTK]: | ||
| 131 | Remove var that is set but not used. | ||
| 132 | (scroll_bar_windows_size): Now size_t, not int. | ||
| 133 | (x_send_scroll_bar_event): Use size_t, not int, for sizes. | ||
| 134 | Check for overflow. | ||
| 135 | |||
| 136 | * xfaces.c (realize_named_face): Remove vars that are set but not used. | ||
| 137 | (map_tty_color) [!defined MSDOS]: Likewise. | ||
| 138 | |||
| 139 | * term.c (tty_write_glyphs): Use size_t; this avoids overflow warning. | ||
| 140 | |||
| 141 | * coding.c: Remove vars that are set but not used. | ||
| 142 | (DECODE_COMPOSITION_RULE): Remove 2nd arg, which is unused. | ||
| 143 | All callers changed. | ||
| 144 | (decode_coding_utf_8, decode_coding_utf_16 decode_coding_emacs_mule): | ||
| 145 | (decode_coding_iso_2022, encode_coding_sjis, encode_coding_big5): | ||
| 146 | (decode_coding_charset): Remove vars that are set but not used. | ||
| 147 | |||
| 148 | * bytecode.c (Fbyte_code) [!defined BYTE_CODE_SAFE]: Remove var | ||
| 149 | that is set but not used. | ||
| 150 | |||
| 151 | * print.c (print_object): Remove var that is set but not used. | ||
| 152 | |||
| 153 | Replace 2 copies of readlink code with 1 gnulib version (Bug#8401). | ||
| 154 | The gnulib version avoids calling malloc in the usual case, | ||
| 155 | and on 64-bit hosts doesn't have some arbitrary 32-bit limits. | ||
| 156 | * fileio.c (Ffile_symlink_p): Use emacs_readlink. | ||
| 157 | * filelock.c (current_lock_owner): Likewise. | ||
| 158 | * lisp.h (READLINK_BUFSIZE, emacs_readlink): New function. | ||
| 159 | * sysdep.c: Include allocator.h, careadlinkat.h. | ||
| 160 | (emacs_no_realloc_allocator): New static constant. | ||
| 161 | (emacs_readlink): New function. | ||
| 162 | * deps.mk (sysdep.o): Depend on ../lib/allocator.h and on | ||
| 163 | ../lib/careadlinkat.h. | ||
| 164 | |||
| 1 | 2011-04-04 Stefan Monnier <monnier@iro.umontreal.ca> | 165 | 2011-04-04 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 166 | ||
| 3 | * keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the | 167 | * keyboard.c (safe_run_hook_funcall): Fix last change (don't stop at the |