summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-02-05 22:12:41 +0000
committerUlrich Drepper <drepper@redhat.com>2007-02-05 22:12:41 +0000
commit93ab56f74c463b3817e73ab5319054abacfe0a95 (patch)
tree8ed3b3bcd85fe77ae544930a7a6fbcef1c3b4e53
parentddfbb6460d8888414a9ae75b7e863f9d5f34112e (diff)
Fix warnings.elfutils-0.126
-rw-r--r--configure.ac2
-rw-r--r--src/ChangeLog6
-rw-r--r--src/ar.c10
-rw-r--r--src/ranlib.c2
4 files changed, 14 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index acdc2d57..7b41b9db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@ AC_INIT([Red Hat elfutils],[0.126],[http://bugzilla.redhat.com/bugzilla/],
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_FILES([config/Makefile])
-AC_COPYRIGHT([Copyright (C) 1996-2003, 2004, 2005, 2006 Red Hat, Inc.])
+AC_COPYRIGHT([Copyright (C) 1996-2003, 2004, 2005, 2006, 2007 Red Hat, Inc.])
AC_PREREQ(2.59) dnl Minimum Autoconf version required.
AM_INIT_AUTOMAKE([gnits 1.7])
diff --git a/src/ChangeLog b/src/ChangeLog
index 39f77648..9a3b2eea 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,9 +1,15 @@
2007-02-05 Ulrich Drepper <drepper@redhat.com>
+ * ar.r: Add ugly hack to work around gcc complaining that we
+ ignore fchown's return value.
+ (do_oper_insert): Handle error when writing padding.
+ * ranlib.c: Add fchown complain work around.
+
* arlib.c: Make symtab a global variable. Change all users.
* arlib2.c: Likewise.
* ranlib.c: Likewise.
* ar.c: Likewise.
+
* arlib.h: Declare it.
2007-01-11 Roland McGrath <roland@redhat.com>
diff --git a/src/ar.c b/src/ar.c
index 19ad4035..37fa3e03 100644
--- a/src/ar.c
+++ b/src/ar.c
@@ -795,7 +795,8 @@ cannot rename temporary file to %.*s"),
original file has. */
|| fchmod (newfd, st.st_mode & ALLPERMS) != 0
/* Never complain about fchown failing. */
- || (fchown (newfd, st.st_uid, st.st_gid),
+ || (({asm ("" :: "r" (fchown (newfd, st.st_uid,
+ st.st_gid))); }),
close (newfd) != 0)
|| (newfd = -1, rename (tmpfname, arfname) != 0))
goto nonew_unlink;
@@ -1039,7 +1040,7 @@ do_oper_delete (const char *arfname, char **argv, int argc,
has. */
if (fchmod (newfd, st.st_mode & ALLPERMS) != 0
/* Never complain about fchown failing. */
- || (fchown (newfd, st.st_uid, st.st_gid),
+ || (({asm ("" :: "r" (fchown (newfd, st.st_uid, st.st_gid))); }),
close (newfd) != 0)
|| (newfd = -1, rename (tmpfname, arfname) != 0))
goto nonew_unlink;
@@ -1478,7 +1479,8 @@ do_oper_insert (int oper, const char *arfname, char **argv, int argc,
/* Pad the file if its size is odd. */
if ((all->size & 1) != 0)
- write (newfd, "\n", 1);
+ if (write (newfd, "\n", 1) != 1)
+ goto nonew_unlink;
}
else
{
@@ -1501,7 +1503,7 @@ do_oper_insert (int oper, const char *arfname, char **argv, int argc,
if (fd != -1
&& (fchmod (newfd, st.st_mode & ALLPERMS) != 0
/* Never complain about fchown failing. */
- || (fchown (newfd, st.st_uid, st.st_gid),
+ || (({asm ("" :: "r" (fchown (newfd, st.st_uid, st.st_gid))); }),
close (newfd) != 0)
|| (newfd = -1, rename (tmpfname, arfname) != 0)))
goto nonew_unlink;
diff --git a/src/ranlib.c b/src/ranlib.c
index 9a884cb1..d86a8e39 100644
--- a/src/ranlib.c
+++ b/src/ranlib.c
@@ -289,7 +289,7 @@ handle_file (const char *fname)
original file has. */
|| fchmod (newfd, st.st_mode & ALLPERMS) != 0
/* Never complain about fchown failing. */
- || (fchown (newfd, st.st_uid, st.st_gid),
+ || (({asm ("" :: "r" (fchown (newfd, st.st_uid, st.st_gid))); }),
close (newfd) != 0)
|| (newfd = -1, rename (tmpfname, fname) != 0))
goto nonew_unlink;