From patchwork Sun Jan 17 17:53:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 569296 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 3DB0B14076E for ; Mon, 18 Jan 2016 04:54:01 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=Ddb0u1Gh; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:mime-version :content-type; q=dns; s=default; b=OrrPOGgLMeh3n7am+pJ2vbBTX0a42 x8DLGQmmpLQ+IbkuYMWtgnNZ5w2sSceTxzxypb7bHpdf7wHtmiiMv1skBjfDSfa8 UmdBG0Rtb31HYePKSpC1G+ACwVF86HQXRxP7l3hbSzFfcOXEg0uk7gBKXPHCOHfM MkYUOiKvJFaNTg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:mime-version :content-type; s=default; bh=9lyts5Xjm7du4QmniKpevoWQHgU=; b=Ddb 0u1GhDzSoQ7GQdYvC+El5KZpptMgg1It0vd4bHroT7GtFu5y89QFIaTTPoJ/vYjI Dg6AwMjwJWeIdh/1YrGm6NDphxoMJnjJ9rbkNhvs5f+cDcJNoWbrnq57pCAA/oCx lRHLYMFMRieIjrBurfjddYQOmkH8Y2UtQSsO4dOY= Received: (qmail 74577 invoked by alias); 17 Jan 2016 17:53:53 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 74562 invoked by uid 89); 17 Jan 2016 17:53:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=**s X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sun, 17 Jan 2016 17:53:52 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id F01631454; Sun, 17 Jan 2016 17:53:50 +0000 (UTC) Received: from tucnak.zalov.cz ([10.3.113.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0HHrmGe004088 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 17 Jan 2016 12:53:49 -0500 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id u0HHrk8m017367; Sun, 17 Jan 2016 18:53:47 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id u0HHrjSG017366; Sun, 17 Jan 2016 18:53:45 +0100 Date: Sun, 17 Jan 2016 18:53:45 +0100 From: Jakub Jelinek To: Ilya Enkovich Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix a warning in mpx wrappers Message-ID: <20160117175345.GP3017@tucnak.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes Hi! The following patch fixes a warning in libmpx: ../../../../libmpx/mpxwrap/mpx_wrappers.c:492:8: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] *d = *s; ^ Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2016-01-17 Jakub Jelinek * mpxwrap/mpx_wrappers.c (__mpx_wrapper_memmove): Avoid -Wdiscarded-qualifiers warning. Fix up formatting. Jakub --- libmpx/mpxwrap/mpx_wrappers.c.jj 2015-12-31 01:11:17.000000000 +0100 +++ libmpx/mpxwrap/mpx_wrappers.c 2016-01-16 10:37:54.488048781 +0100 @@ -486,12 +486,12 @@ __mpx_wrapper_memmove (void *dst, const /* When we copy exactly one pointer it is faster to just use bndldx + bndstx. */ if (n == sizeof (void *)) - { - const void **s = (const void**)src; - void **d = (void**)dst; - *d = *s; - return dst; - } + { + void *const *s = (void *const *) src; + void **d = (void **) dst; + *d = *s; + return dst; + } memmove (dst, src, n);