Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp425599ybz; Wed, 22 Apr 2020 00:38:14 -0700 (PDT) X-Google-Smtp-Source: APiQypKvYnrzaQSVfWcBTP9rQy8Cje6xUMnDUSKDOzJ6oHM9DFBWtipVuZ0wAM5symqkTbzRn9Xx X-Received: by 2002:a50:b882:: with SMTP id l2mr22209305ede.350.1587541093973; Wed, 22 Apr 2020 00:38:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587541093; cv=none; d=google.com; s=arc-20160816; b=H//D75vZuE3chNZ2LP5greKzK9yqxhtMJB53viOEBQI7yTbw5HcqHwR14Kb1Urz/0H 91oI5/QUm8pRCSBoxYtMvTlu14pyy3zJhLbVjjDQO69liljHmj8hWrDyiqL25kDWL3QZ cmzAeCUOXpQRo0EaP0r0pL0zhYFL7wecCDKRoajL18GMmO7BxsiAxvZFszLxAbYHjvcl HMRkw7NPjrEBHjRGiMNxnExZ+idzRD9s5k/b9fzDw4vEuVIOaq8gYGG/Xp40fE4UF9// 1QUcK1ePxj53BrEdrgqYCAkBzeTjk0onQA//nDJHOUBNIib6f2ZTUaw8MUBQmgTSUpyg H1IQ== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=2rywiPOvhtUZuR9on+A2BwOMhNQZyBHE2gXKybNecaA=; b=aKJ+o50wUpBZlSj0TqjfO9KMxjQfcvD5lOlH2944bRMvJh4hvxN2fRPsfJL0J9Va05 5ZpDrtYwb3aOMFJ285T3dwRbNcZamM+NWR7FYLqrP2UF7e6gNXi0y92kbIfz2qY0PIsw y+WFGSkG2/3ufT/CcNBNyhDnvykMm9OH7db77EvlZccmkePMA8fVF7Dv92Q8W+cODC+W 6PJkpvOqmlJGyidf6cCTsow+wDy5WnN0ux9g1YZ+XeJ++eQr0yRTTkwHxJdr/3Ymywgv ijmj5045xYjCchuPd2s6lvYlsvjuHYCd5ovxt1PnaOeHgiPIk2xLGRbMOZhLrG4lbcn2 wvng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p25si2921115eji.408.2020.04.22.00.37.51; Wed, 22 Apr 2020 00:38:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726399AbgDVHgi (ORCPT + 99 others); Wed, 22 Apr 2020 03:36:38 -0400 Received: from mga14.intel.com ([192.55.52.115]:53133 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725811AbgDVHgh (ORCPT ); Wed, 22 Apr 2020 03:36:37 -0400 IronPort-SDR: vImTca02YxtXN3YuKH3kNHxXDXMpxM4oV/aPVadU6J0m/s9NbU8GVDI4xgbZHKyKCDNhHvYdQS QDZvO91OCcLw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2020 00:36:37 -0700 IronPort-SDR: +Df1GZqIX6BzgTnln2lNtwlmSbZGLpqIynJLSUWBSCXlbUf0gTW+Fsivufie4VbI/TnnDhQkhw WCmBL7Ull+1A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,412,1580803200"; d="scan'208";a="456407390" Received: from shao2-debian.sh.intel.com (HELO localhost) ([10.239.13.3]) by fmsmga005.fm.intel.com with ESMTP; 22 Apr 2020 00:36:34 -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 Cc: Rong Chen , kbuild test robot , Kuninori Morimoto Subject: [PATCH] ASoC: soc-compress: avoid false-positive Wuninitialized warning Date: Wed, 22 Apr 2020 15:35:43 +0800 Message-Id: <20200422073543.1671-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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 50062eb79adb..e7bd80ed7f2e 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 = rtd->cpu_dai; int ret, i; -- 2.20.1