aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Schwab2013-07-20 10:25:46 +0200
committerAndreas Schwab2013-07-20 10:25:46 +0200
commit6b1b199dc0e3e7f8028fabe87fac446f5a845479 (patch)
tree21896547e8ecb0ddcfe50803431da9b02a7bcf19 /src
parent3f5bef16fab0ba83cb2298f8137fec831af1aec4 (diff)
downloademacs-6b1b199dc0e3e7f8028fabe87fac446f5a845479.tar.gz
emacs-6b1b199dc0e3e7f8028fabe87fac446f5a845479.zip
* lread.c (Fload): Avoid uninitialized warning.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/lread.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index a63e441dcb2..712fc2bc3b5 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12013-07-20 Andreas Schwab <schwab@linux-m68k.org>
2
3 * lread.c (Fload): Avoid uninitialized warning.
4
12013-07-19 Paul Eggert <eggert@cs.ucla.edu> 52013-07-19 Paul Eggert <eggert@cs.ucla.edu>
2 6
3 Fix some minor file descriptor leaks and related glitches. 7 Fix some minor file descriptor leaks and related glitches.
diff --git a/src/lread.c b/src/lread.c
index 146543a99fd..e701338da31 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; 1047 int fd_index = 0;
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,7 @@ Return t if the file exists and loads successfully. */)
1175#endif 1175#endif
1176 } 1176 }
1177 1177
1178 if (0 <= fd) 1178 if (fd >= 0)
1179 { 1179 {
1180 fd_index = SPECPDL_INDEX (); 1180 fd_index = SPECPDL_INDEX ();
1181 record_unwind_protect_int (close_file_unwind, fd); 1181 record_unwind_protect_int (close_file_unwind, fd);