Merge "Fix compiler warnings."

am: 2623d1370f

Change-Id: I0905307275eb260a5ec762aa1ed101c00db36468
This commit is contained in:
Chih-Hung Hsieh 2017-12-20 00:15:08 +00:00 committed by android-build-merger
commit 8f7122a989
4 changed files with 0 additions and 38 deletions

View file

@ -63,35 +63,17 @@ struct fb_context_t {
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 @@ int mapFrameBufferLocked(struct private_module_t* module)
* 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);

View file

@ -66,20 +66,6 @@ static void getLinuxRelease(int* major, int* minor) {
}
}
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 @@ status_t InputHub::readNotify() {
}
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) {

View file

@ -213,8 +213,6 @@ private:
int mEpollFd;
int mINotifyFd;
int mWakeEventFd;
int mWakeReadPipeFd;
int mWakeWritePipeFd;
// Callback for input events
std::shared_ptr<InputCallbackInterface> mInputCallback;

View file

@ -45,8 +45,6 @@ private:
int32_t mRelX = 0;
int32_t mRelY = 0;
bool mHaveRelWheel = false;
bool mHaveRelHWheel = false;
int32_t mRelWheel = 0;
int32_t mRelHWheel = 0;
};