]> git.eshelyaron.com Git - emacs.git/commitdiff
* fileio.c (emacs_lseek): Work around GCC bug 43772.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 15 Jun 2011 19:29:18 +0000 (12:29 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 15 Jun 2011 19:29:18 +0000 (12:29 -0700)
src/fileio.c

index 2e0b3831e8d77af924646132c9521ff10336401e..fd5277cbd591f404f611c606111b55733ba7aeb9 100644 (file)
@@ -3114,7 +3114,9 @@ read_non_regular_quit (Lisp_Object ignore)
 static off_t
 emacs_lseek (int fd, EMACS_INT offset, int whence)
 {
-  if (! (TYPE_MINIMUM (off_t) <= offset && offset <= TYPE_MAXIMUM (off_t)))
+  /* Use "&" rather than "&&" to suppress a bogus GCC warning; see
+     <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43772>.  */
+  if (! ((TYPE_MINIMUM (off_t) <= offset) & (offset <= TYPE_MAXIMUM (off_t))))
     {
       errno = EINVAL;
       return -1;