From patchwork Wed May 30 08:59:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Herbert Xu X-Patchwork-Id: 10437923 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 694B3602CC for ; Wed, 30 May 2018 08:59:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5AD592887A for ; Wed, 30 May 2018 08:59:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4E524288C3; Wed, 30 May 2018 08:59:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5BBB12887A for ; Wed, 30 May 2018 08:59:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936039AbeE3I7t (ORCPT ); Wed, 30 May 2018 04:59:49 -0400 Received: from orcrist.hmeau.com ([104.223.48.154]:54060 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935975AbeE3I7s (ORCPT ); Wed, 30 May 2018 04:59:48 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1fNwxP-00081C-MR; Wed, 30 May 2018 16:59:47 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1fNwxP-0006sm-Im; Wed, 30 May 2018 16:59:47 +0800 Date: Wed, 30 May 2018 16:59:47 +0800 From: Herbert Xu To: DASH Mailing List Subject: eval: Silence warning on localvar_stop Message-ID: <20180530085947.klq6zwj7j2bl52v7@gondor.apana.org.au> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) Sender: dash-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dash@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The variable localvar_stop is set iff vlocal is true. gcc doesn't get this so we need to silence the warning with uninitialized_var. Signed-off-by: Herbert Xu diff --git a/src/eval.c b/src/eval.c index c300d0c..ebec829 100644 --- a/src/eval.c +++ b/src/eval.c @@ -54,6 +54,7 @@ #include "redir.h" #include "input.h" #include "output.h" +#include "system.h" #include "trap.h" #include "var.h" #include "memalloc.h" @@ -714,7 +715,7 @@ evalcommand(union node *cmd, int flags, struct backcmd *backcmd) evalcommand(union node *cmd, int flags) #endif { - struct localvar_list *localvar_stop; + struct localvar_list *uninitialized_var(localvar_stop); struct parsefile *file_stop; struct redirtab *redir_stop; struct stackmark smark;