From 917344232cc3d5e300d83d71501fed1e45cb27e8 Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Tue, 22 May 2012 23:54:32 +0000 Subject: [PATCH] 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 --- libatomic/ChangeLog | 5 +++++ libatomic/tas_n.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/libatomic/ChangeLog b/libatomic/ChangeLog index 4f170244a2e..ac46c3f2890 100644 --- a/libatomic/ChangeLog +++ b/libatomic/ChangeLog @@ -1,3 +1,8 @@ +2012-05-22 John David Anglin + + PR other/53231 + * tas_n.c (libat_test_and_set): Correct return. Remove unused variable. + 2012-05-16 H.J. Lu * configure: Regenerated. diff --git a/libatomic/tas_n.c b/libatomic/tas_n.c index f137707f711..faa8e263794 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