From patchwork Fri Jul 4 15:14:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Newton X-Patchwork-Id: 367129 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 8752D1400B9 for ; Sat, 5 Jul 2014 01:14:37 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; q=dns; s= default; b=dPKP2qJecCi93grQZfsMKELBNxLh0j2qJE4ssbkzKkXGzNxXkTkDG 4MUVkDIklPk+IiI4iESunWaWOpSTZR0cLpWOteNwBSnxCYE9OeLh5BgH2KzmU7iG gQL+9u1a640hKVJEzKCKTmKXsHerk/v1ZDWhkgPtg7DMIOzMgzQz/M= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; s=default; bh=9jD+4e99eMMxfIqoTSXFJWU0dKo=; b=lHEEL0hIpfmhz+zggFxKbhaxfYWI D3S2ompSe6qEYzOS+8RmbHy7wsS+sUogNS5sWLjoqYEmzvo8/xEj8RMViShSDem8 r9STqcajpMk+YD5oL7oVQTWYATXUvspsZ0NOrO+FzXcQDVPSzDvCqQWmR3ONCOkf d/LtLq4ZW8yYQro= Received: (qmail 17819 invoked by alias); 4 Jul 2014 15:14:31 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 17801 invoked by uid 89); 4 Jul 2014 15:14:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-we0-f179.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=3ivAzkMTYJaXg7O+rvXvIm9bFR1M0Tffx0qMn1Tf1io=; b=K0p2mDb9Yf6AjDJvCqyLlZAqhlxvG4/JYPE6AeXBoelVzhB405dvW89mRoyra9Bpk8 rTn8UPBuwk1DCZl9z8NCGbShnJrFxP2vLDeiQtp+MhGh5GazorVERV6zv6Eznop2MlA0 VNRM4/XV9vuikk7Sw7kaoJgTlIJ70h4MxSlbBnj3ctMxFy8gHH/Q7FSDSVqzWsocF+s6 bm+/ctKvlGw43ea/BsoZXJhizVLIPbXuGOhLfcze8IcTYYQXc9f0O8xAeHX9qkkvRxmt rHsTeTXmpBySyjk+XfgjPB9kyNzVZGD32XnKTy4XQQfRQ+epqCnmKmHr+Rg/u06h44qR mlNg== X-Gm-Message-State: ALoCoQnJ0sGKcDUmC2uuqdpdKU7q3Sal/3IP09D1ixZUQWg94ga1iegJvSzJdk7w2z50ETLCvwOt X-Received: by 10.195.11.34 with SMTP id ef2mr3840236wjd.123.1404486865481; Fri, 04 Jul 2014 08:14:25 -0700 (PDT) From: Will Newton To: libc-alpha@sourceware.org Subject: [PATCH] ARM: Fix compiler warnings from atomic.h Date: Fri, 4 Jul 2014 16:14:20 +0100 Message-Id: <1404486860-9676-1-git-send-email-will.newton@linaro.org> __arch_compare_and_exchange_bool_*_int return a boolean so in the dummy implementations for 8, 16 and 64 bits return zero rather than oldval. Zero is used rather than TRUE or FALSE to avoid needing to including any headers for these dummy functions. ChangeLog: 2014-07-04 Will Newton * sysdeps/arm/bits/atomic.h (__arch_compare_and_exchange_bool_8_int): Evaluate to zero. (__arch_compare_and_exchange_bool_16_int): Likewise. (__arch_compare_and_exchange_bool_64_int): Likewise. --- sysdeps/arm/bits/atomic.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sysdeps/arm/bits/atomic.h b/sysdeps/arm/bits/atomic.h index c2d5be5..88cbe67 100644 --- a/sysdeps/arm/bits/atomic.h +++ b/sysdeps/arm/bits/atomic.h @@ -96,10 +96,10 @@ void __arm_link_error (void); For all "bool" routines, we return FALSE if exchange succesful. */ # define __arch_compare_and_exchange_bool_8_int(mem, newval, oldval, model) \ - ({__arm_link_error (); oldval; }) + ({__arm_link_error (); 0; }) # define __arch_compare_and_exchange_bool_16_int(mem, newval, oldval, model) \ - ({__arm_link_error (); oldval; }) + ({__arm_link_error (); 0; }) # define __arch_compare_and_exchange_bool_32_int(mem, newval, oldval, model) \ ({ \ @@ -109,7 +109,7 @@ void __arm_link_error (void); }) # define __arch_compare_and_exchange_bool_64_int(mem, newval, oldval, model) \ - ({__arm_link_error (); oldval; }) + ({__arm_link_error (); 0; }) # define __arch_compare_and_exchange_val_8_int(mem, newval, oldval, model) \ ({__arm_link_error (); oldval; })