Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp858675imm; Wed, 11 Jul 2018 12:11:36 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeFP0IliwRi9Dhb9Pv47vURFCZDRbpaepppTPeFHBibgjIflpgWXKj3kAymttvfZ52sWlQH X-Received: by 2002:a17:902:e85:: with SMTP id 5-v6mr29890727plx.318.1531336296385; Wed, 11 Jul 2018 12:11:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531336296; cv=none; d=google.com; s=arc-20160816; b=Wj69a7HwaRXmFXCWNKBhAt+7HDoEFIgAV3OneP2693Ora34lgXiorGHsSN0OuEv2Mx hWZ7SmWWYTodQWoJXl+0BIHD6J75k/YwzWii7mDFeC9P/Py+TVZcV6Qc8AINC4hxWPOx ig+2kRM0ITSAJnXD4AsDC8qPtbJ2u0CfrDu3UXA+jMEQGRmew9ElSiwnZZ4RCeOl1loK J0Qa2jiVYS2vhb/cxocfgI82YEEhWwU/8HeO+iiPIZzEZtbW1DhEj8Yo8aCmEEnxZolH 3ypMtmmnqwylK2kK+Z8tk5Zh8rJqNLWHnWRQhdZQhxafTKjnoyCLY2B4qxwpSz9OrNTL iN/Q== 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=sIYb3an14OzUWn+uZf0KvZzBzhQsfQq33ngt3UJE9vU=; b=u8p7oIGmZsukfHa/exiv4Y9tUfjun4Z+i8kN2LLO6FibhyYYznwyRi+KCHyWvpSWiP umAaQkQEEej7St4gZNiFhuwRZKj6PAJsCV9tlH8xnpmWWYS9rUmKOZiMzmQdTRs8utdC 5YVGqRxiqyzLWlO14LghpPFVLpwBrJ/be4qmZNd+3K6ABsqtImuTMYcGcAsllGslx/CU 9s4qv32BDvvxBK/uoJ8DeoWtRRnT3J2oM4t3dQ4CXoITv71cBR1cvYioyj/wi/qzTdm/ qZnktP0s8boIBVLInMu/dCpl278h6L1JbcY1zhtMiJnUFeeKenA2Njn52G7kSJVOlUMc oF5A== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v35-v6si20381873plg.117.2018.07.11.12.11.21; Wed, 11 Jul 2018 12:11:36 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389649AbeGKQWt (ORCPT + 99 others); Wed, 11 Jul 2018 12:22:49 -0400 Received: from mailout.easymail.ca ([64.68.200.34]:43623 "EHLO mailout.easymail.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733263AbeGKQWt (ORCPT ); Wed, 11 Jul 2018 12:22:49 -0400 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 3A6C541845; Wed, 11 Jul 2018 16:17:45 +0000 (UTC) Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo03-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bKHQOHrj915V; Wed, 11 Jul 2018 16:17:45 +0000 (UTC) Received: from [192.168.1.87] (c-24-9-64-241.hsd1.co.comcast.net [24.9.64.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id D315D41831; Wed, 11 Jul 2018 16:17:38 +0000 (UTC) Subject: Re: [PATCH v2] selftests/android: initialize heap_type to avoid compiling warning To: Li Zhijian , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Pintu Agarwal , Shuah Khan References: <1531274880-9375-1-git-send-email-lizhijian@cn.fujitsu.com> From: Shuah Khan Message-ID: <53f02d65-9a91-2661-3052-d46032389e3a@kernel.org> Date: Wed, 11 Jul 2018 10:17:37 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <1531274880-9375-1-git-send-email-lizhijian@cn.fujitsu.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/10/2018 08:08 PM, Li Zhijian wrote: > root@vm-lkp-nex04-8G-7 ~/linux-v4.18-rc2/tools/testing/selftests/android# make > make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. > make[1]: Entering directory '/root/linux-v4.18-rc2/tools/testing/selftests/android/ion' > gcc -I. -I../../../../../drivers/staging/android/uapi/ -I../../../../../usr/include/ -Wall -O2 -g ionapp_export.c ipcsocket.c ionutils.c -o ionapp_export > ionapp_export.c: In function 'main': > ionapp_export.c:91:2: warning: 'heap_type' may be used uninitialized in > this function [-Wmaybe-uninitialized] > printf("heap_type: %ld, heap_size: %ld\n", heap_type, heap_size); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > CC: Shuah Khan > CC: Pintu Agarwal > Signed-off-by: Li Zhijian > --- > tools/testing/selftests/android/ion/ionapp_export.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/testing/selftests/android/ion/ionapp_export.c b/tools/testing/selftests/android/ion/ionapp_export.c > index a944e72..b5fa0a2 100644 > --- a/tools/testing/selftests/android/ion/ionapp_export.c > +++ b/tools/testing/selftests/android/ion/ionapp_export.c > @@ -51,6 +51,7 @@ int main(int argc, char *argv[]) > > heap_size = 0; > flags = 0; > + heap_type = ION_HEAP_TYPE_SYSTEM; > > while ((opt = getopt(argc, argv, "hi:s:")) != -1) { > switch (opt) { > Thanks. Applied to linux-kselftest next after updating the commit message "Initialize heap_type to ION_HEAP_TYPE_SYSTEM to avoid "used uninitialized" compiler warning. heap_type gets used after initialization, this change is to just keep the compiler happy." thanks, -- Shuah