From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AC89C2BA19 for ; Fri, 24 Apr 2020 00:56:06 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E589620704 for ; Fri, 24 Apr 2020 00:56:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="H4VS63Gd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E589620704 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 44134168D; Fri, 24 Apr 2020 02:55:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 44134168D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1587689764; bh=Qm3YW8GelMoa0wGffv/oUEJDP4CoBgjSRwqlUZU3Oc8=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=H4VS63Gdydu5Roozy+RRn4DXCmAgxMgXc3e30trr3odQYT0wjD5GKh2nyQgl4SuYD 2uj5185XVdED9CeVsK/rdTXBeqrDBOIGLIl7VchwSoLaSa/DgS2nKwtfLt7qf42pHx MjVpIUt+NBi187y8D2OyyTXj1s/v3LL3zJwdGKVA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id BB483F8014A; Fri, 24 Apr 2020 02:55:13 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6DE45F801EC; Fri, 24 Apr 2020 02:55:11 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 8155BF800FF for ; Fri, 24 Apr 2020 02:55:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8155BF800FF IronPort-SDR: 6RmO95odyck0H6MmNYrqzJPMsqjzANaCoyeEIT7mKacFyjt0NS7+47mjski8vpIe3Fut6Eo/B/ mL55Tf/8A5dQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Apr 2020 17:54:56 -0700 IronPort-SDR: lB41GEDhV85GA7tfq07v2fLk/Bk/F3oxHXYNJBfZ9JuS3a6hGj+RLPWgZ+cPHICGpaVd7xG6hR BdqHtn1O30Nw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,309,1583222400"; d="scan'208";a="430560009" Received: from shao2-debian.sh.intel.com (HELO localhost) ([10.239.13.3]) by orsmga005.jf.intel.com with ESMTP; 23 Apr 2020 17:54:54 -0700 From: Rong Chen To: Vinod Koul , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] ASoC: soc-compress: avoid false-positive Wuninitialized warning Date: Fri, 24 Apr 2020 08:54:37 +0800 Message-Id: <20200424005437.3941-1-rong.a.chen@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <202004201540.vYPhhYMs%lkp@intel.com> References: <202004201540.vYPhhYMs%lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: kbuild test robot , Kuninori Morimoto , Rong Chen X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" gcc-6.5 and earlier show a new warning: sound/soc/soc-compress.c: In function ‘soc_compr_open’: sound/soc/soc-compress.c:75:28: warning: ‘component’ is used uninitialized in this function [-Wuninitialized] struct snd_soc_component *component, *save = NULL; ^~~~~~~~~ Simplest fix is to initialize it to avoid the warning. Reported-by: kbuild test robot Cc: Kuninori Morimoto Link: https://lore.kernel.org/lkml/202004201540.vYPhhYMs%25lkp@intel.com Signed-off-by: Rong Chen --- sound/soc/soc-compress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c index ceaf976db0bb..8431ff72be63 100644 --- a/sound/soc/soc-compress.c +++ b/sound/soc/soc-compress.c @@ -72,7 +72,7 @@ static int soc_compr_components_free(struct snd_compr_stream *cstream, static int soc_compr_open(struct snd_compr_stream *cstream) { struct snd_soc_pcm_runtime *rtd = cstream->private_data; - struct snd_soc_component *component, *save = NULL; + struct snd_soc_component *component = NULL, *save = NULL; struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0); int ret, i; -- 2.20.1