aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>2012-05-22 23:54:32 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2012-05-22 23:54:32 +0000
commit917344232cc3d5e300d83d71501fed1e45cb27e8 (patch)
treefa00c02d9f04ecb49587b7a65037a9a8b548dfe3
parent4579805199475b408ec9a837b0f27c9e1c9d0f6d (diff)
downloadgcc-917344232cc3d5e300d83d71501fed1e45cb27e8.zip
gcc-917344232cc3d5e300d83d71501fed1e45cb27e8.tar.gz
gcc-917344232cc3d5e300d83d71501fed1e45cb27e8.tar.bz2
re PR other/53231 (libatomic/tas_n.c:100:10: error: 'ret' undeclared (first use in this function))
PR other/53231 * tas_n.c (libat_test_and_set): Correct return. Remove unused variable. From-SVN: r187783
-rw-r--r--libatomic/ChangeLog5
-rw-r--r--libatomic/tas_n.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/libatomic/ChangeLog b/libatomic/ChangeLog
index 4f17024..ac46c3f 100644
--- a/libatomic/ChangeLog
+++ b/libatomic/ChangeLog
@@ -1,3 +1,8 @@
+2012-05-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR other/53231
+ * tas_n.c (libat_test_and_set): Correct return. Remove unused variable.
+
2012-05-16 H.J. Lu <hongjiu.lu@intel.com>
* configure: Regenerated.
diff --git a/libatomic/tas_n.c b/libatomic/tas_n.c
index f137707..faa8e26 100644
--- a/libatomic/tas_n.c
+++ b/libatomic/tas_n.c
@@ -85,7 +85,7 @@ SIZE(libat_test_and_set) (UTYPE *mptr, int smodel)
bool
SIZE(libat_test_and_set) (UTYPE *mptr, int smodel)
{
- UTYPE oldval, newval;
+ UTYPE oldval;
UWORD magic;
pre_seq_barrier (smodel);
@@ -97,7 +97,7 @@ SIZE(libat_test_and_set) (UTYPE *mptr, int smodel)
protect_end (mptr, magic);
post_seq_barrier (smodel);
- return ret != 0;
+ return oldval != 0;
}
#define DONE 1