diff options
| author | Paul Eggert | 2013-07-20 07:21:25 -0700 |
|---|---|---|
| committer | Paul Eggert | 2013-07-20 07:21:25 -0700 |
| commit | b2a069c2f80cb2fdd683f5e044642b058c4d2326 (patch) | |
| tree | e13cbdc50df7d864128ce63b90ba132d5187f74d /src | |
| parent | 7e67809332c7ac0c798eb13d5573a5804db8134e (diff) | |
| download | emacs-b2a069c2f80cb2fdd683f5e044642b058c4d2326.tar.gz emacs-b2a069c2f80cb2fdd683f5e044642b058c4d2326.zip | |
* lread.c (Fload): Avoid initialization only when lint checking.
Mention that it's needed only for older GCCs.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/lread.c | 9 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 5f3a48cbe88..c88951f9422 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-07-20 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | * lread.c (Fload): Avoid initialization only when lint checking. | ||
| 4 | Mention that it's needed only for older GCCs. | ||
| 5 | |||
| 1 | 2013-07-20 Kenichi Handa <handa@gnu.org> | 6 | 2013-07-20 Kenichi Handa <handa@gnu.org> |
| 2 | 7 | ||
| 3 | * coding.c (CODING_ISO_FLAG_LEVEL_4): New macro. | 8 | * coding.c (CODING_ISO_FLAG_LEVEL_4): New macro. |
diff --git a/src/lread.c b/src/lread.c index e701338da31..57c7df74127 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -1044,7 +1044,7 @@ Return t if the file exists and loads successfully. */) | |||
| 1044 | { | 1044 | { |
| 1045 | FILE *stream; | 1045 | FILE *stream; |
| 1046 | int fd; | 1046 | int fd; |
| 1047 | int fd_index = 0; | 1047 | int fd_index; |
| 1048 | ptrdiff_t count = SPECPDL_INDEX (); | 1048 | ptrdiff_t count = SPECPDL_INDEX (); |
| 1049 | struct gcpro gcpro1, gcpro2, gcpro3; | 1049 | struct gcpro gcpro1, gcpro2, gcpro3; |
| 1050 | Lisp_Object found, efound, hist_file_name; | 1050 | Lisp_Object found, efound, hist_file_name; |
| @@ -1175,7 +1175,12 @@ Return t if the file exists and loads successfully. */) | |||
| 1175 | #endif | 1175 | #endif |
| 1176 | } | 1176 | } |
| 1177 | 1177 | ||
| 1178 | if (fd >= 0) | 1178 | if (fd < 0) |
| 1179 | { | ||
| 1180 | /* Pacify older GCC with --enable-gcc-warnings. */ | ||
| 1181 | IF_LINT (fd_index = 0); | ||
| 1182 | } | ||
| 1183 | else | ||
| 1179 | { | 1184 | { |
| 1180 | fd_index = SPECPDL_INDEX (); | 1185 | fd_index = SPECPDL_INDEX (); |
| 1181 | record_unwind_protect_int (close_file_unwind, fd); | 1186 | record_unwind_protect_int (close_file_unwind, fd); |