From 78181df1efee04bb861893714d8b11a24243153f Mon Sep 17 00:00:00 2001 From: Jin Wei Date: Thu, 18 Oct 2012 17:00:48 +0800 Subject: fix valgrind ioctl warning. Initialize local variable to avoid syscall ioctl warning. Change-Id: I33a90917856018a8527305bb362948ef03bd734c Origin-Change-Id: I022ebce40b3774a815639a5af34bc7aeb2489936 Signed-off-by: Jin Wei Signed-off-by: Jian Luo Signed-off-by: Bruce Beare Signed-off-by: Jack Ren Author-tracking-BZ: 62797 --- libs/binder/ProcessState.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/binder/ProcessState.cpp') diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp index 294e1d4898..6464254f5d 100644 --- a/libs/binder/ProcessState.cpp +++ b/libs/binder/ProcessState.cpp @@ -318,7 +318,7 @@ static int open_driver() int fd = open("/dev/binder", O_RDWR); if (fd >= 0) { fcntl(fd, F_SETFD, FD_CLOEXEC); - int vers; + int vers = 0; status_t result = ioctl(fd, BINDER_VERSION, &vers); if (result == -1) { ALOGE("Binder ioctl to obtain version failed: %s", strerror(errno)); -- cgit v1.2.3-59-g8ed1b