OSDN Git Service

fix valgrind ioctl warning.
authorJin Wei <wei.a.jin@intel.com>
Thu, 18 Oct 2012 09:00:48 +0000 (17:00 +0800)
committerJian Luo <jian.luo@intel.com>
Sat, 31 Aug 2013 23:05:36 +0000 (19:05 -0400)
Initialize local variable to avoid syscall ioctl warning.

Change-Id: I33a90917856018a8527305bb362948ef03bd734c
Origin-Change-Id: I022ebce40b3774a815639a5af34bc7aeb2489936
Signed-off-by: Jin Wei <wei.a.jin@intel.com>
Signed-off-by: Jian Luo <jian.luo@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 62797

libs/binder/ProcessState.cpp

index 294e1d4..6464254 100644 (file)
@@ -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));