Fix compiler warnings.
* Remove unused local variables, functions, and private fields.
Bug: 66996870
Test: normal build
Change-Id: I3a5d6035a61be1b846dc8df3807088d2ca5dc4a3
diff --git a/modules/gralloc/framebuffer.cpp b/modules/gralloc/framebuffer.cpp
index 7ef8098..9796457 100644
--- a/modules/gralloc/framebuffer.cpp
+++ b/modules/gralloc/framebuffer.cpp
@@ -63,35 +63,17 @@
static int fb_setSwapInterval(struct framebuffer_device_t* dev,
int interval)
{
- fb_context_t* ctx = (fb_context_t*)dev;
if (interval < dev->minSwapInterval || interval > dev->maxSwapInterval)
return -EINVAL;
// FIXME: implement fb_setSwapInterval
return 0;
}
-static int fb_setUpdateRect(struct framebuffer_device_t* dev,
- int l, int t, int w, int h)
-{
- if (((w|h) <= 0) || ((l|t)<0))
- return -EINVAL;
-
- fb_context_t* ctx = (fb_context_t*)dev;
- private_module_t* m = reinterpret_cast<private_module_t*>(
- dev->common.module);
- m->info.reserved[0] = 0x54445055; // "UPDT";
- m->info.reserved[1] = (uint16_t)l | ((uint32_t)t << 16);
- m->info.reserved[2] = (uint16_t)(l+w) | ((uint32_t)(t+h) << 16);
- return 0;
-}
-
static int fb_post(struct framebuffer_device_t* dev, buffer_handle_t buffer)
{
if (private_handle_t::validate(buffer) < 0)
return -EINVAL;
- fb_context_t* ctx = (fb_context_t*)dev;
-
private_handle_t const* hnd = reinterpret_cast<private_handle_t const*>(buffer);
private_module_t* m = reinterpret_cast<private_module_t*>(
dev->common.module);
@@ -279,7 +261,6 @@
* map the framebuffer
*/
- int err;
size_t fbSize = roundUpToPageSize(finfo.line_length * info.yres_virtual);
module->framebuffer = new private_handle_t(dup(fd), fbSize, 0);
diff --git a/modules/input/evdev/InputHub.cpp b/modules/input/evdev/InputHub.cpp
index e2c65fa..af7b28e 100644
--- a/modules/input/evdev/InputHub.cpp
+++ b/modules/input/evdev/InputHub.cpp
@@ -66,20 +66,6 @@
}
}
-static bool processHasCapability(int capability) {
- LOG_ALWAYS_FATAL_IF(!cap_valid(capability), "invalid linux capability: %d", capability);
- struct __user_cap_header_struct cap_header_data;
- struct __user_cap_data_struct cap_data_data[2];
- cap_user_header_t caphdr = &cap_header_data;
- cap_user_data_t capdata = cap_data_data;
- caphdr->pid = 0;
- caphdr->version = _LINUX_CAPABILITY_VERSION_3;
- LOG_ALWAYS_FATAL_IF(capget(caphdr, capdata) != 0,
- "Could not get process capabilities. errno=%d", errno);
- int idx = CAP_TO_INDEX(capability);
- return capdata[idx].effective & CAP_TO_MASK(capability);
-}
-
class EvdevDeviceNode : public InputDeviceNode {
public:
static EvdevDeviceNode* openDeviceNode(const std::string& path);
@@ -691,7 +677,6 @@
}
size_t event_pos = 0;
- nsecs_t now = systemTime(SYSTEM_TIME_MONOTONIC);
while (res >= static_cast<int>(sizeof(*event))) {
event = reinterpret_cast<struct inotify_event*>(event_buf + event_pos);
if (event->len) {
diff --git a/modules/input/evdev/InputHub.h b/modules/input/evdev/InputHub.h
index 1abdc09..827cbde 100644
--- a/modules/input/evdev/InputHub.h
+++ b/modules/input/evdev/InputHub.h
@@ -213,8 +213,6 @@
int mEpollFd;
int mINotifyFd;
int mWakeEventFd;
- int mWakeReadPipeFd;
- int mWakeWritePipeFd;
// Callback for input events
std::shared_ptr<InputCallbackInterface> mInputCallback;
diff --git a/modules/input/evdev/MouseInputMapper.h b/modules/input/evdev/MouseInputMapper.h
index 1f8bc06..73eab98 100644
--- a/modules/input/evdev/MouseInputMapper.h
+++ b/modules/input/evdev/MouseInputMapper.h
@@ -45,8 +45,6 @@
int32_t mRelX = 0;
int32_t mRelY = 0;
- bool mHaveRelWheel = false;
- bool mHaveRelHWheel = false;
int32_t mRelWheel = 0;
int32_t mRelHWheel = 0;
};