From patchwork Tue Jul 11 09:37:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 118356 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp353059vqm; Tue, 11 Jul 2023 02:37:50 -0700 (PDT) X-Google-Smtp-Source: APBJJlEKIKh91CHgim2DdB1NYY8VxGTHgqrMHHFkqXZSGm15Siq4JX9YOdzrWcG+P2hlHFN73jn/ X-Received: by 2002:a17:906:4ad2:b0:98d:dfde:eb80 with SMTP id u18-20020a1709064ad200b0098ddfdeeb80mr15493034ejt.27.1689068270314; Tue, 11 Jul 2023 02:37:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689068270; cv=none; d=google.com; s=arc-20160816; b=p/aPupXorS34oZ22Z0gMQ+VRIRoianZIgi6OBSNAtKNS3zZZSPnrtcveiqhA6q9jfI cUoalf8bFqyzKdnM3DSLMeEEYGs3Q7jpKCglc51VwVFIbYC/hFzVypuNlAbDQh/+ft+Y pPofYJDDZuzoues6iQIhTrihYXu9sYde9cnkuWGBu9yrWkw+FZADd0PceRW1J/3cWMaB 0Of34qEGgsUvqN1ecNXdkZDdEAHOntB/CpqEJwTlm7pvMjTV8JUy8F5BBn/ov4eXSwSk Ef9aB7KUuCyPB9+4OZM5XuxLsTlRm+yWpc3GvXrbcaV7phcd1ebgLG79gZO4R61scOGv GzcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:mime-version :user-agent:message-id:date:subject:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=r/LlrQeK7LVLVP+ooUGj7fn9ehtc5pzQglUZtLY+vzg=; fh=41Jd4gXEdp8RTPlluDRE3c11GGV4DWL61bXnhTaoXBQ=; b=mLwuREYvv5OUSrWEBsc0lqfURlI+7XJwPvb2mcsHDmSoyqXj9M1OFTgsd+sDD7JVei e5YrqCHUtQROB91auXRHn5qqYOX8Hlx4zXyO9ecsdoP1rcRO43L5EPeB9lUs8LcvA2zM x1FE7HlBSf9YpJfZKNToY+RoC2jN4OD/71iL+EFPhfR51xwZhN4WEaGz64VFC9lUvPyS EFxzQotqWO+HHCcClrK7ZvYle9UiAlhtfhHeHWKDoc4sdvDd+Opv7YY0ru/2FT9SQC33 BCVb8MLF2caSkF7K67rrnfbPYy4WYlPlAl1ZJg2Ety/8gihUfRufCB0RlYp6ewc6rhuC TeOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=roz+SgKN; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id cf13-20020a170906b2cd00b00988a7f7cd11si1721439ejb.515.2023.07.11.02.37.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jul 2023 02:37:50 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=roz+SgKN; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 008C1385770B for ; Tue, 11 Jul 2023 09:37:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 008C1385770B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689068269; bh=r/LlrQeK7LVLVP+ooUGj7fn9ehtc5pzQglUZtLY+vzg=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=roz+SgKNGcRpXX9lBFW6iFoUdK21Ggzxhb7sUyVrFv9Vj/C3B5ls/qVd1kZKsQUHe XcpZDeA6pbsZBnv6kZAG5GBL9wb+tHJAiBty8wCgx5cRUjuMNaBCfDvq/t9li99UuP ei8mUKHW4VW5jaqoouYV0Hg3sCGJApgJE2T7+QgM= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id BD97D385840E for ; Tue, 11 Jul 2023 09:37:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BD97D385840E Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-594-D8jFiys7MKOat9xrgapAZw-1; Tue, 11 Jul 2023 05:37:04 -0400 X-MC-Unique: D8jFiys7MKOat9xrgapAZw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B3BD78030AC for ; Tue, 11 Jul 2023 09:37:03 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.2.16.46]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5C3074067A00 for ; Tue, 11 Jul 2023 09:37:03 +0000 (UTC) To: gcc-patches@gcc.gnu.org Subject: [PATCH] aarch64: Fix warnings during libgcc build Date: Tue, 11 Jul 2023 11:37:01 +0200 Message-ID: <875y6qeqma.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Florian Weimer via Gcc-patches From: Florian Weimer Reply-To: Florian Weimer Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771116450381830273 X-GMAIL-MSGID: 1771116450381830273 libgcc/ * config/aarch64/aarch64-unwind.h (aarch64_cie_signed_with_b_key): Add missing const qualifier. Cast from const unsigned char * to const char *. Use __builtin_strchr to avoid an implicit function declaration. * config/aarch64/linux-unwind.h (aarch64_fallback_frame_state): Add missing cast. --- libgcc/config/aarch64/aarch64-unwind.h | 4 ++-- libgcc/config/aarch64/linux-unwind.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libgcc/config/aarch64/aarch64-unwind.h b/libgcc/config/aarch64/aarch64-unwind.h index 3ad2f8239ed..30e428862c4 100644 --- a/libgcc/config/aarch64/aarch64-unwind.h +++ b/libgcc/config/aarch64/aarch64-unwind.h @@ -40,8 +40,8 @@ aarch64_cie_signed_with_b_key (struct _Unwind_Context *context) const struct dwarf_cie *cie = get_cie (fde); if (cie != NULL) { - char *aug_str = cie->augmentation; - return strchr (aug_str, 'B') == NULL ? 0 : 1; + const char *aug_str = (const char *) cie->augmentation; + return __builtin_strchr (aug_str, 'B') == NULL ? 0 : 1; } } return 0; diff --git a/libgcc/config/aarch64/linux-unwind.h b/libgcc/config/aarch64/linux-unwind.h index 00eba866049..93da7a9537d 100644 --- a/libgcc/config/aarch64/linux-unwind.h +++ b/libgcc/config/aarch64/linux-unwind.h @@ -77,7 +77,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context, } rt_ = context->cfa; - sc = &rt_->uc.uc_mcontext; + sc = (struct sigcontext *) &rt_->uc.uc_mcontext; /* This define duplicates the definition in aarch64.md */ #define SP_REGNUM 31