Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp2125439imm; Sat, 23 Jun 2018 10:00:25 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJI8N/i2yQsD7jZ3KQv3/IWvR8EP5tfEiUJs9IRfOZDb2zPHL20b6QZckoB2HXqpYl5tood X-Received: by 2002:a17:902:52ee:: with SMTP id a101-v6mr6122993pli.131.1529773225378; Sat, 23 Jun 2018 10:00:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529773225; cv=none; d=google.com; s=arc-20160816; b=ROjDroRZrmePwMI03T0A7njkCFRziH07ZZZHWkckGYjLJ6HY34XBBoFB+ibQ2yotcZ Y7iLFESBlBddnQJ8Ah59lTTqTk7R+zHPTSQo8hQ/0E7CApXlt4eaG+nMoVnuioUsNMs9 V7ou9muVmuhkrkWZaC7XIFAwnAap777jUpyT3v0DxbEC63m676up5HNpS3DJKFplFrxE WZy24fJyso80lcVZpxxDsHfzeUBtCYhLaUbbWnI6cIOaw59gUNSTkFnHDAbpE0SuguzF 0ECSFJp1C/LfWXzBc1SZZ+OunCn20i6q/VE3an8D5Qjy3jzjX/awNQr9YlUe4Hjg/RSu VX6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=T+Dma5JUgeDXRWceXre9Elreq5Ae2d+bJVsvLqUJUlI=; b=m9qiQl6vGQ9GEaSuaggkZxRs1fmrWn1/CybiasZpDEEHMgX7eDL2vGE9tDq9o8yhXh QImxsZRoCQt92BoB/zxdWFr11HJnlz4dHbAH9DmJ9v0qHNSjtlP5wyyLxcnODinmWsfR 7vRjNBuywp311zqWYy6sXTKk2dz2/kof92hUcBpE6Yyp+BM7fdZLmoUVdoQ5g4DkqZn4 xed7vld0OdLj1l+8r/nXEUqQLMjnzROyBq5sgm9ba2cvOumNESrDM2GgT+VToLqieXlg ZultqDvNZM2doMgoCpSSsZ14xvVWewKTx3UBW+79jfZnJ9eikDlNzKaZPVurf6tcEDGP K0gg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1-v6si9743677pld.11.2018.06.23.10.00.10; Sat, 23 Jun 2018 10:00:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751840AbeFWQ7b (ORCPT + 99 others); Sat, 23 Jun 2018 12:59:31 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:64924 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751727AbeFWQ7a (ORCPT ); Sat, 23 Jun 2018 12:59:30 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 41ChVj2gGHz9ttRy; Sat, 23 Jun 2018 18:59:25 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id oIAHvpdXQBuG; Sat, 23 Jun 2018 18:59:25 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 41ChVj26FFz9ttRr; Sat, 23 Jun 2018 18:59:25 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 6927D8B7F8; Sat, 23 Jun 2018 18:59:29 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id PMwD1uLZRYPD; Sat, 23 Jun 2018 18:59:29 +0200 (CEST) Received: from [192.168.232.53] (unknown [192.168.232.53]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 6B10C8B74B; Sat, 23 Jun 2018 18:59:28 +0200 (CEST) Subject: =?UTF-8?Q?Re:_[PATCH]_powerpc/xmon:_avoid_warnings_about_variables_?= =?UTF-8?Q?that_might_be_clobbered_by_=e2=80=98longjmp=e2=80=99?= To: Mathieu Malaterre , Michael Ellerman Cc: Yisheng Xie , Vaibhav Jain , Nicholas Piggin , linux-kernel@vger.kernel.org, Paul Mackerras , Breno Leitao , linuxppc-dev@lists.ozlabs.org References: <20180622192718.24242-1-malat@debian.org> From: christophe leroy Message-ID: Date: Sat, 23 Jun 2018 18:59:27 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180622192718.24242-1-malat@debian.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit X-Antivirus: Avast (VPS 180623-2, 23/06/2018), Outbound message X-Antivirus-Status: Clean Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 22/06/2018 à 21:27, Mathieu Malaterre a écrit : > Move initialization of variables after data definitions. This silence > warnings treated as error with W=1: > > arch/powerpc/xmon/xmon.c:3389:14: error: variable ‘name’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered] > arch/powerpc/xmon/xmon.c:3100:22: error: variable ‘tsk’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered] Is that an invalid warning ? If so, please explain in the commit log. Otherwise, I'd expect one to fix the warning, not just cheat on GCC. Christophe > > Signed-off-by: Mathieu Malaterre > --- > arch/powerpc/xmon/xmon.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c > index 47166ad2a669..982848c784ff 100644 > --- a/arch/powerpc/xmon/xmon.c > +++ b/arch/powerpc/xmon/xmon.c > @@ -3097,10 +3097,11 @@ static void show_pte(unsigned long addr) > static void show_tasks(void) > { > unsigned long tskv; > - struct task_struct *tsk = NULL; > + struct task_struct *tsk; > > printf(" task_struct ->thread.ksp PID PPID S P CMD\n"); > > + tsk = NULL; > if (scanhex(&tskv)) > tsk = (struct task_struct *)tskv; > > @@ -3386,10 +3387,11 @@ static void xmon_print_symbol(unsigned long address, const char *mid, > const char *after) > { > char *modname; > - const char *name = NULL; > + const char *name; > unsigned long offset, size; > > printf(REG, address); > + name = NULL; > if (setjmp(bus_error_jmp) == 0) { > catch_memory_errors = 1; > sync(); > --- L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast. https://www.avast.com/antivirus