From 6b1b199dc0e3e7f8028fabe87fac446f5a845479 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 20 Jul 2013 10:25:46 +0200 Subject: [PATCH] * lread.c (Fload): Avoid uninitialized warning. --- src/ChangeLog | 4 ++++ src/lread.c | 4 ++-- 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 @@ +2013-07-20 Andreas Schwab + + * lread.c (Fload): Avoid uninitialized warning. + 2013-07-19 Paul Eggert 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. */) { FILE *stream; int fd; - int fd_index; + int fd_index = 0; ptrdiff_t count = SPECPDL_INDEX (); struct gcpro gcpro1, gcpro2, gcpro3; Lisp_Object found, efound, hist_file_name; @@ -1175,7 +1175,7 @@ Return t if the file exists and loads successfully. */) #endif } - if (0 <= fd) + if (fd >= 0) { fd_index = SPECPDL_INDEX (); record_unwind_protect_int (close_file_unwind, fd); -- 2.11.4.GIT