]> git.eshelyaron.com Git - emacs.git/commitdiff
* lread.c (read1): Simplify slightly to avoid an overflow warning
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 26 May 2012 08:30:49 +0000 (01:30 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 26 May 2012 08:30:49 +0000 (01:30 -0700)
with GCC 4.7.0 on x86-64.

src/ChangeLog
src/lread.c

index acae070f068be0ffde033a28abc28a1bbb619974..2981e754c8a8e378ba338da60c07d15cc5732aa8 100644 (file)
@@ -1,3 +1,8 @@
+2012-05-26  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * lread.c (read1): Simplify slightly to avoid an overflow warning
+       with GCC 4.7.0 on x86-64.
+
 2012-05-26  Eli Zaretskii  <eliz@gnu.org>
 
        * bidi.c (bidi_mirror_char): Revert last change: an int is
index 80250cfcb1ce765309542e69577355dcefce03f1..7aba203d6855c35feda60fbc688f0010afa16ad2 100644 (file)
@@ -2986,19 +2986,14 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
        if (!NILP (Vpurify_flag) && NILP (Vdoc_file_name) && cancel)
          return make_number (0);
 
-       if (force_multibyte)
-         /* READ_BUFFER already contains valid multibyte forms.  */
-         ;
-       else if (force_singlebyte)
+       if (! force_multibyte && force_singlebyte)
          {
+           /* READ_BUFFER contains raw 8-bit bytes and no multibyte
+              forms.  Convert it to unibyte.  */
            nchars = str_as_unibyte ((unsigned char *) read_buffer,
                                     p - read_buffer);
            p = read_buffer + nchars;
          }
-       else
-         {
-           /* Otherwise, READ_BUFFER contains only ASCII.  */
-         }
 
        return make_specified_string (read_buffer, nchars, p - read_buffer,
                                      (force_multibyte