[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180924113124.916353987@linuxfoundation.org>
Date: Mon, 24 Sep 2018 13:53:18 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Shuah Khan <shuah@...nel.org>,
Pintu Agarwal <pintu.ping@...il.com>,
Li Zhijian <lizhijian@...fujitsu.com>,
Sasha Levin <alexander.levin@...rosoft.com>
Subject: [PATCH 4.18 212/235] selftests/android: initialize heap_type to avoid compiling warning
4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Li Zhijian <lizhijian@...fujitsu.com>
[ Upstream commit cc7c673032fc7427087e74b75f732b43db38a256 ]
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.
root@...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 <shuah@...nel.org>
CC: Pintu Agarwal <pintu.ping@...il.com>
Signed-off-by: Li Zhijian <lizhijian@...fujitsu.com>
Signed-off-by: Shuah Khan (Samsung OSG) <shuah@...nel.org>
Signed-off-by: Sasha Levin <alexander.levin@...rosoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
tools/testing/selftests/android/ion/ionapp_export.c | 1 +
1 file changed, 1 insertion(+)
--- 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) {
Powered by blists - more mailing lists