From 8eddd88568fe4da0ca0ceab5072bc488827f01b5 Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Mon, 18 May 2015 15:51:54 -0700 Subject: Use memset to initialize dynamic array. clang/llvm rejects int32_t events[len] = {};. BUG: 21269094 Change-Id: I0257bfbb72f1b49913baba0164d5a3a7976c452d --- camera/ICameraService.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'camera') diff --git a/camera/ICameraService.cpp b/camera/ICameraService.cpp index a02dbe2..0071e70 100644 --- a/camera/ICameraService.cpp +++ b/camera/ICameraService.cpp @@ -494,7 +494,8 @@ status_t BnCameraService::onTransact( __FUNCTION__, len); return FAILED_TRANSACTION; } - int32_t events[len] = {}; + int32_t events[len]; + memset(events, 0, sizeof(int32_t) * len); status_t status = data.read(events, sizeof(int32_t) * len); if (status != NO_ERROR) { ALOGE("%s: Received poorly formatted binder request: notifySystemEvent.", -- cgit v1.1