diff options
| author | Paul Eggert | 2011-03-22 18:01:59 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-03-22 18:01:59 -0700 |
| commit | c9c49752e15c105ded153e9ab0a42743f57184e5 (patch) | |
| tree | e395db95d87459082bace9fcf3a2cec0ea3d1aea /src/ChangeLog | |
| parent | 9d0da923ebd2b78abb6e02f0b90cfe9d818eb301 (diff) | |
| parent | b9b4b7cb4c27f9f6ad644168f0e1241e5c0d6eaa (diff) | |
| download | emacs-c9c49752e15c105ded153e9ab0a42743f57184e5.tar.gz emacs-c9c49752e15c105ded153e9ab0a42743f57184e5.zip | |
Fix more problems found by GCC 4.5.2's static checks.
Diffstat (limited to 'src/ChangeLog')
| -rw-r--r-- | src/ChangeLog | 127 |
1 files changed, 127 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f489a233683..a4312efceb9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,130 @@ | |||
| 1 | 2011-03-23 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Fix more problems found by GCC 4.5.2's static checks. | ||
| 4 | |||
| 5 | * coding.c (encode_coding_raw_text): Avoid unnecessary test | ||
| 6 | the first time through the loop, since we know p0 < p1 then. | ||
| 7 | This also avoids a gcc -Wstrict-overflow warning. | ||
| 8 | |||
| 9 | * lisp.h (SAFE_ALLOCA, SAFE_ALLOCA_LISP): Avoid 'int' overflow | ||
| 10 | leading to a memory leak, possible in functions like | ||
| 11 | load_charset_map_from_file that can allocate an unbounded number | ||
| 12 | of objects (Bug#8318). | ||
| 13 | |||
| 14 | * xmenu.c (set_frame_menubar): Use EMACS_UINT, not int, for indexes | ||
| 15 | that could (at least in theory) be that large. | ||
| 16 | |||
| 17 | * xdisp.c (message_log_check_duplicate): Return unsigned long, not int. | ||
| 18 | This is less likely to overflow, and avoids undefined behavior if | ||
| 19 | overflow does occur. All callers changed. Use strtoul to scan | ||
| 20 | for the unsigned long integer. | ||
| 21 | (pint2hrstr): Simplify and tune code slightly. | ||
| 22 | This also avoids a (bogus) GCC warning with gcc -Wstrict-overflow. | ||
| 23 | |||
| 24 | * scroll.c (do_scrolling): Work around GCC bug 48228. | ||
| 25 | See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48228>. | ||
| 26 | |||
| 27 | * frame.c (Fmodify_frame_parameters): Simplify loop counter. | ||
| 28 | This also avoids a warning with gcc -Wstrict-overflow. | ||
| 29 | (validate_x_resource_name): Simplify count usage. | ||
| 30 | This also avoids a warning with gcc -Wstrict-overflow. | ||
| 31 | |||
| 32 | * fileio.c (Fcopy_file): Report error if fchown or fchmod | ||
| 33 | fail (Bug#8306). | ||
| 34 | |||
| 35 | * emacs.c (Fdaemon_initialized): Do not ignore I/O errors (Bug#8303). | ||
| 36 | |||
| 37 | * process.c (Fmake_network_process): Use socklen_t, not int, | ||
| 38 | where POSIX says socklen_t is required in portable programs. | ||
| 39 | This fixes a porting bug on hosts like 64-bit HP-UX, where | ||
| 40 | socklen_t is wider than int (Bug#8277). | ||
| 41 | (Fmake_network_process, server_accept_connection): | ||
| 42 | (wait_reading_process_output, read_process_output): | ||
| 43 | Likewise. | ||
| 44 | |||
| 45 | * process.c: Rename or move locals to avoid shadowing. | ||
| 46 | (list_processes_1, Fmake_network_process): | ||
| 47 | (read_process_output_error_handler, exec_sentinel_error_handler): | ||
| 48 | Rename or move locals. | ||
| 49 | (Fmake_network_process): Define label "retry_connect" only if needed. | ||
| 50 | (Fnetwork_interface_info): Fix pointer signedness. | ||
| 51 | (process_send_signal): Add cast to avoid pointer signedness problem. | ||
| 52 | (FIRST_PROC_DESC, IF_NON_BLOCKING_CONNECT): Remove unused macros. | ||
| 53 | (create_process): Use 'volatile' to avoid vfork clobbering (Bug#8298). | ||
| 54 | |||
| 55 | Make tparam.h and terminfo.c consistent. | ||
| 56 | * cm.c (tputs, tgoto, BC, UP): Remove extern decls. Include | ||
| 57 | tparam.h instead, since it declares them. | ||
| 58 | * cm.h (PC): Remove extern decl; tparam.h now does this. | ||
| 59 | * deps.mk (cm.o, terminfo.o): Depend on tparam.h. | ||
| 60 | * terminfo.c: Include tparam.h, to check interfaces. | ||
| 61 | (tparm): Make 1st arg a const pointer in decl. Put it at top level. | ||
| 62 | (tparam): Adjust signature to match interface in tparam.h; | ||
| 63 | this removes some undefined behavior. Check that outstring and len | ||
| 64 | are zero, which they always are with Emacs. | ||
| 65 | * tparam.h (PC, BC, UP): New extern decls. | ||
| 66 | |||
| 67 | * xftfont.c (xftfont_shape): Now static, and defined only if needed. | ||
| 68 | (xftfont_open): Rename locals to avoid shadowing. | ||
| 69 | |||
| 70 | * ftfont.c (ftfont_resolve_generic_family): Fix pointer signedness. | ||
| 71 | (ftfont_otf_capability, ftfont_shape): Omit decls if not needed. | ||
| 72 | (OTF_TAG_SYM): Omit macro if not needed. | ||
| 73 | (ftfont_list): Remove unused local. | ||
| 74 | (get_adstyle_property, ftfont_pattern_entity): | ||
| 75 | (ftfont_lookup_cache, ftfont_open, ftfont_anchor_point): | ||
| 76 | Rename locals to avoid shadowing. | ||
| 77 | |||
| 78 | * xfont.c (xfont_list_family): Mark var as initialized. | ||
| 79 | |||
| 80 | * xml.c (make_dom): Now static. | ||
| 81 | |||
| 82 | * composite.c (composition_compute_stop_pos): Rename local to | ||
| 83 | avoid shadowing. | ||
| 84 | (composition_reseat_it): Remove unused locals. | ||
| 85 | (find_automatic_composition, composition_adjust_point): Likewise. | ||
| 86 | (composition_update_it): Mark var as initialized. | ||
| 87 | (find_automatic_composition): Mark vars as initialized, | ||
| 88 | with a FIXME (Bug#8290). | ||
| 89 | |||
| 90 | character.h: Rename locals to avoid shadowing. | ||
| 91 | * character.h (PREV_CHAR_BOUNDARY, FETCH_STRING_CHAR_ADVANCE): | ||
| 92 | (FETCH_STRING_CHAR_AS_MULTIBYTE_ADVANCE, FETCH_CHAR_ADVANCE): | ||
| 93 | (FETCH_CHAR_ADVANCE_NO_CHECK, INC_POS, DEC_POS, BUF_INC_POS): | ||
| 94 | (BUF_DEC_POS): Be more systematic about renaming local temporaries | ||
| 95 | to avoid shadowing. | ||
| 96 | |||
| 97 | * textprop.c (property_change_between_p): Remove; unused. | ||
| 98 | |||
| 99 | * intervals.c (interval_start_pos): Now static. | ||
| 100 | |||
| 101 | * intervals.h (CHECK_TOTAL_LENGTH): Avoid empty "else". | ||
| 102 | |||
| 103 | * atimer.c (start_atimer, append_atimer_lists, set_alarm): Rename | ||
| 104 | locals to avoid shadowing. | ||
| 105 | |||
| 106 | * sound.c (wav_play, au_play, Fplay_sound_internal): | ||
| 107 | Fix pointer signedness. | ||
| 108 | (alsa_choose_format): Remove unused local var. | ||
| 109 | (wav_play): Initialize a variable to 0, to prevent undefined | ||
| 110 | behavior (Bug#8278). | ||
| 111 | |||
| 112 | * region-cache.c (insert_cache_boundary): Redo var to avoid shadowing. | ||
| 113 | |||
| 114 | * region-cache.h (pp_cache): New decl, for gcc -Wmissing-prototypes. | ||
| 115 | |||
| 116 | * callproc.c (Fcall_process): Use 'volatile' to avoid vfork | ||
| 117 | clobbering (Bug#8298). | ||
| 118 | * sysdep.c (sys_subshell): Likewise. | ||
| 119 | Previously, the sys_subshell 'volatile' was incorrectly IF_LINTted out. | ||
| 120 | |||
| 121 | * lisp.h (child_setup): Now NO_RETURN unless DOS_NT. | ||
| 122 | This should get cleaned up, so that child_setup has the | ||
| 123 | same signature on all platforms. | ||
| 124 | |||
| 125 | * callproc.c (call_process_cleanup): Now static. | ||
| 126 | (relocate_fd): Rename locals to avoid shadowing. | ||
| 127 | |||
| 1 | 2011-03-22 Chong Yidong <cyd@stupidchicken.com> | 128 | 2011-03-22 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 129 | ||
| 3 | * xterm.c (x_clear_frame): Remove XClearWindow call. This appears | 130 | * xterm.c (x_clear_frame): Remove XClearWindow call. This appears |