]> git.eshelyaron.com Git - emacs.git/commitdiff
* lread.c (Fload): Avoid initialization only when lint checking.
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 20 Jul 2013 14:21:25 +0000 (07:21 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 20 Jul 2013 14:21:25 +0000 (07:21 -0700)
Mention that it's needed only for older GCCs.

src/ChangeLog
src/lread.c

index 5f3a48cbe88aebabc1775cacdfb6a0f983004cb3..c88951f9422d6f1210dd09d4512351f3fdd26328 100644 (file)
@@ -1,3 +1,8 @@
+2013-07-20  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * lread.c (Fload): Avoid initialization only when lint checking.
+       Mention that it's needed only for older GCCs.
+
 2013-07-20  Kenichi Handa  <handa@gnu.org>
 
        * coding.c (CODING_ISO_FLAG_LEVEL_4): New macro.
index e701338da31ea409c73c149b50495302a3b0e54e..57c7df74127da42a1f95e5b7fef7efed01b46387 100644 (file)
@@ -1044,7 +1044,7 @@ Return t if the file exists and loads successfully.  */)
 {
   FILE *stream;
   int fd;
-  int fd_index = 0;
+  int fd_index;
   ptrdiff_t count = SPECPDL_INDEX ();
   struct gcpro gcpro1, gcpro2, gcpro3;
   Lisp_Object found, efound, hist_file_name;
@@ -1175,7 +1175,12 @@ Return t if the file exists and loads successfully.  */)
 #endif
     }
 
-  if (fd >= 0)
+  if (fd < 0)
+    {
+      /* Pacify older GCC with --enable-gcc-warnings.  */
+      IF_LINT (fd_index = 0);
+    }
+  else
     {
       fd_index = SPECPDL_INDEX ();
       record_unwind_protect_int (close_file_unwind, fd);