aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-07-16 18:18:51 -0700
committerPaul Eggert2011-07-16 18:18:51 -0700
commit9e381cdd9641fa07e9caa09b783db8d5f84f1651 (patch)
treea2c6d0fee2c4909c8176ce46226ffef96bd60113 /src
parent4e190b801d917b3c5080442c1daba38020c3fe8c (diff)
downloademacs-9e381cdd9641fa07e9caa09b783db8d5f84f1651.tar.gz
emacs-9e381cdd9641fa07e9caa09b783db8d5f84f1651.zip
* 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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/fileio.c4
2 files changed, 11 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 7f8717176b0..d12558e5d6d 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12011-07-17 Paul Eggert <eggert@cs.ucla.edu>
2
3 * fileio.c (Fcopy_file): Pacify gcc re fchown. (Bug#9002)
4 This works around a problem with the previous change to Fcopy_file.
5 Recent glibc declares fchown with __attribute__((warn_unused_result)),
6 and without this change, GCC might complain about discarding
7 fchown's return value.
8
12011-07-16 Juanma Barranquero <lekktu@gmail.com> 92011-07-16 Juanma Barranquero <lekktu@gmail.com>
2 10
3 * makefile.w32-in (GLOBAL_SOURCES): Add gnutls.c (followup to bug#9059). 11 * 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 <http://www.gnu.org/licenses/>. */
38#include <selinux/context.h> 38#include <selinux/context.h>
39#endif 39#endif
40 40
41#include <ignore-value.h>
42
41#include "lisp.h" 43#include "lisp.h"
42#include "intervals.h" 44#include "intervals.h"
43#include "buffer.h" 45#include "buffer.h"
@@ -1960,7 +1962,7 @@ on the system, we copy the SELinux context of FILE to NEWNAME. */)
1960 if (input_file_statable_p) 1962 if (input_file_statable_p)
1961 { 1963 {
1962 if (!NILP (preserve_uid_gid)) 1964 if (!NILP (preserve_uid_gid))
1963 fchown (ofd, st.st_uid, st.st_gid); 1965 ignore_value (fchown (ofd, st.st_uid, st.st_gid));
1964 if (fchmod (ofd, st.st_mode & 07777) != 0) 1966 if (fchmod (ofd, st.st_mode & 07777) != 0)
1965 report_file_error ("Doing chmod", Fcons (newname, Qnil)); 1967 report_file_error ("Doing chmod", Fcons (newname, Qnil));
1966 } 1968 }