From: Paul Eggert Date: Sun, 17 Jul 2011 01:18:51 +0000 (-0700) Subject: * fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002) X-Git-Tag: emacs-pretest-24.0.90~104^2~215 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9e381cdd9641fa07e9caa09b783db8d5f84f1651;p=emacs.git * fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002) This works around a problem with the previous change to Fcopy_file. Recent glibc declares fchown with __attribute__((warn_unused_result)), and without this change, GCC might complain about discarding fchown's return value. --- diff --git a/src/ChangeLog b/src/ChangeLog index 7f8717176b0..d12558e5d6d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2011-07-17 Paul Eggert + + * fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002) + This works around a problem with the previous change to Fcopy_file. + Recent glibc declares fchown with __attribute__((warn_unused_result)), + and without this change, GCC might complain about discarding + fchown's return value. + 2011-07-16 Juanma Barranquero * makefile.w32-in (GLOBAL_SOURCES): Add gnutls.c (followup to bug#9059). diff --git a/src/fileio.c b/src/fileio.c index de822cdb466..a52e834c2b2 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -38,6 +38,8 @@ along with GNU Emacs. If not, see . */ #include #endif +#include + #include "lisp.h" #include "intervals.h" #include "buffer.h" @@ -1960,7 +1962,7 @@ on the system, we copy the SELinux context of FILE to NEWNAME. */) if (input_file_statable_p) { if (!NILP (preserve_uid_gid)) - fchown (ofd, st.st_uid, st.st_gid); + ignore_value (fchown (ofd, st.st_uid, st.st_gid)); if (fchmod (ofd, st.st_mode & 07777) != 0) report_file_error ("Doing chmod", Fcons (newname, Qnil)); }