From 47e12ed81d5b513626c07f6273cef8c859d8c20d Mon Sep 17 00:00:00 2001 From: Danny Wood Date: Fri, 24 May 2019 08:33:09 +0100 Subject: [PATCH] universal7580: camera: fix compiler warnings in wrapper Change-Id: Iaecd86986ebbcbe3d6d1130b2b31a772d61949b6 --- camera/Camera2Wrapper.cpp | 13 ++----------- camera/CameraWrapper.cpp | 10 ++++++++++ camera/CameraWrapper.h | 9 --------- 3 files changed, 12 insertions(+), 20 deletions(-) diff --git a/camera/Camera2Wrapper.cpp b/camera/Camera2Wrapper.cpp index 2fa813d..d4dc35f 100644 --- a/camera/Camera2Wrapper.cpp +++ b/camera/Camera2Wrapper.cpp @@ -58,12 +58,7 @@ static int check_vendor_module() * Camera2 wrapper fixup functions *******************************************************************/ -static char * camera2_fixup_getparams(int id __unused, const char * settings) -{ - bool videoMode = false; - const char* isoMode; - char *manipBuf; - +static char * camera2_fixup_getparams(int id __unused, const char * settings) { android::CameraParameters params; params.unflatten(android::String8(settings)); @@ -83,11 +78,7 @@ static char * camera2_fixup_getparams(int id __unused, const char * settings) return ret; } -static char * camera2_fixup_setparams(int id __unused, const char * settings) -{ - bool videoMode = false; - const char* isoMode; - +static char * camera2_fixup_setparams(int id __unused, const char * settings) { android::CameraParameters params; params.unflatten(android::String8(settings)); diff --git a/camera/CameraWrapper.cpp b/camera/CameraWrapper.cpp index 82e941e..8dcf5c2 100644 --- a/camera/CameraWrapper.cpp +++ b/camera/CameraWrapper.cpp @@ -23,6 +23,15 @@ #include "CameraWrapper.h" #include "Camera2Wrapper.h" +static int camera_device_open(const hw_module_t* module, const char* name, + hw_device_t** device); +static int camera_get_number_of_cameras(void); +static int camera_get_camera_info(int camera_id, struct camera_info *info); +static int camera_set_callbacks(const camera_module_callbacks_t *callbacks); +static void camera_get_vendor_tag_ops(vendor_tag_ops_t* ops); +static int camera_open_legacy(const struct hw_module_t* module, const char* id, uint32_t halVersion, struct hw_device_t** device); +static int camera_set_torch_mode(const char* camera_id, bool enabled); + static camera_module_t *gVendorModule = 0; static int check_vendor_module() @@ -113,6 +122,7 @@ static void camera_get_vendor_tag_ops(vendor_tag_ops_t* ops) static int camera_open_legacy(const struct hw_module_t* module, const char* id, uint32_t halVersion, struct hw_device_t** device) { + (void)halVersion; ALOGV("%s", __FUNCTION__); if (check_vendor_module()) return 0; diff --git a/camera/CameraWrapper.h b/camera/CameraWrapper.h index 34e099f..d9aeb99 100644 --- a/camera/CameraWrapper.h +++ b/camera/CameraWrapper.h @@ -23,12 +23,3 @@ static android::Mutex gCameraWrapperLock; -static int camera_device_open(const hw_module_t* module, const char* name, - hw_device_t** device); -static int camera_device_close(hw_device_t* device); -static int camera_get_number_of_cameras(void); -static int camera_get_camera_info(int camera_id, struct camera_info *info); -static int camera_set_callbacks(const camera_module_callbacks_t *callbacks); -static void camera_get_vendor_tag_ops(vendor_tag_ops_t* ops); -static int camera_open_legacy(const struct hw_module_t* module, const char* id, uint32_t halVersion, struct hw_device_t** device); -static int camera_set_torch_mode(const char* camera_id, bool enabled); -- 2.20.1