From patchwork Tue May 2 17:13:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prathamesh Kulkarni X-Patchwork-Id: 98454 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp1976262qgf; Tue, 2 May 2017 10:14:19 -0700 (PDT) X-Received: by 10.99.8.67 with SMTP id 64mr34063621pgi.220.1493745259671; Tue, 02 May 2017 10:14:19 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id o89si13943pfa.352.2017.05.02.10.14.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 May 2017 10:14:19 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-452626-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-452626-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-452626-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=pbqPqnMs2qPsgASWLsunn2j4/QWRlFZp1EaW276Ofq3oe1 qTmSvMXQNsj2Bq7f4xRyS00moi1FgQDmohOzXmTriIZS7xYJEyJNWZDGt83sH4LB CVwhxEXpZneIyOXavK4UauZVrbLOjzxzeUKSJdivYsnzzhMzo1Hk1tp0g8++k= 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 :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=j/HBZXZLs7gahbmStfc7Sss3xnc=; b=ygD0wXS4Zii5Kq57mUht MzD4QM9tBQjiNbbmpnogQcaMJwilEM3NFgbdArJR13p10uoYIHM3QwlSrfiXJuzO 7kd4G2JkSd6Yv546jYSb0Bf7V3HAcvn/T0FOjhHEs889IlNpqSyukXP0nwGhAb5L BAVpeK8GSPmkApsHph+EDcc= Received: (qmail 6812 invoked by alias); 2 May 2017 17:13:59 -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 6750 invoked by uid 89); 2 May 2017 17:13:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.1 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1163 X-HELO: mail-it0-f46.google.com Received: from mail-it0-f46.google.com (HELO mail-it0-f46.google.com) (209.85.214.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 02 May 2017 17:13:57 +0000 Received: by mail-it0-f46.google.com with SMTP id o5so14857078ith.1 for ; Tue, 02 May 2017 10:14:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=+nsfcxkIeyeZYGOSkS6zy/q/voc8ZQJAqKhQwsPDkjs=; b=SosYD7otd+SxkeJ06uUJPO2ZH+CPAEAnYWInms6WBOVzNz5DZII+GvzUN1nWTInJRD gr2CoDlzdcud06mePC5kVvFaRsUDfjF+WsF1ojlceJWTjL3r4J6x3/fRHrPGP9NJDAaN D5emldjvHyXNW3qNe9qW++xoMk2W2CAK0ltg/SwEZa96nL/GY6lMqZNsUpMTGzDnjcOe IQI/wOjAA9s5lYo8hk7nhn+i0E1nY+WjAShtz3mes2BCmGpg28/9JXSB6RO9wp3Ejakd lUdqNN1Dg4fmzvJfp+EzI8/4y49ABFJilBx2MuBex2W2ulFUkxs8Kgb7dHy74LpLCjIa 3LbQ== X-Gm-Message-State: AN3rC/42utIqZl62MsxG74DFsapATJBvCaQzHH/Jn9bA4hxRFw41TP1w 96snl7mVJMnOhUpr4r2iJRjJ6ZAxT7Ba+Os= X-Received: by 10.36.137.212 with SMTP id s203mr3693135itd.57.1493745238567; Tue, 02 May 2017 10:13:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.25.67 with HTTP; Tue, 2 May 2017 10:13:57 -0700 (PDT) From: Prathamesh Kulkarni Date: Tue, 2 May 2017 22:43:57 +0530 Message-ID: Subject: [2/2] PR 78736: libgomp fallout To: gcc Patches , Marek Polacek , "Joseph S. Myers" X-IsSubscribed: yes Hi, During gcc bootstrap, there's a couple of places where the warning got triggered. I suppose this wasn't a false positive since enum gomp_schedule_type and enum omp_sched_t are different types (although they have same set of values) ? Bootstrap+tested on x86_64-unknown-linux-gnu. Is this patch OK to commit ? Thanks, Prathamesh 2017-05-02 Prathamesh Kulkarni * icv.c (omp_set_schedule): Cast kind to enum gomp_schedule_type before assigning to icv->run_sched_var. (omp_get_schedule): Cast icv->run_sched_var to enum omp_sched_t before assigning it to *kind. diff --git a/libgomp/icv.c b/libgomp/icv.c index 233d6dbe10e..71e1f677fd7 100644 --- a/libgomp/icv.c +++ b/libgomp/icv.c @@ -87,14 +87,14 @@ omp_set_schedule (omp_sched_t kind, int chunk_size) default: return; } - icv->run_sched_var = kind; + icv->run_sched_var = (enum gomp_schedule_type) kind; } void omp_get_schedule (omp_sched_t *kind, int *chunk_size) { struct gomp_task_icv *icv = gomp_icv (false); - *kind = icv->run_sched_var; + *kind = (enum omp_sched_t) icv->run_sched_var; *chunk_size = icv->run_sched_chunk_size; }