hwc: Use proper typecasts
- Remove compiler warnings
- Use proper typecasts
Change-Id: I7391f32ae31283239f5cebb93b02f3ce3a5c99f3
diff --git a/libhwcomposer/hwc_fbupdate.cpp b/libhwcomposer/hwc_fbupdate.cpp
index bf2aee5..b51b2ea 100644
--- a/libhwcomposer/hwc_fbupdate.cpp
+++ b/libhwcomposer/hwc_fbupdate.cpp
@@ -239,7 +239,7 @@
overlay::Overlay& ov = *(ctx->mOverlay);
ovutils::eDest dest = mDest;
int fd = hnd->fd;
- uint32_t offset = hnd->offset;
+ uint32_t offset = (uint32_t)hnd->offset;
if(mRot) {
if(!mRot->queueBuffer(fd, offset))
return false;
@@ -396,14 +396,14 @@
bool ret = true;
overlay::Overlay& ov = *(ctx->mOverlay);
if(mDestLeft != ovutils::OV_INVALID) {
- if (!ov.queueBuffer(hnd->fd, hnd->offset, mDestLeft)) {
+ if (!ov.queueBuffer(hnd->fd, (uint32_t)hnd->offset, mDestLeft)) {
ALOGE("%s: queue failed for left of dpy = %d",
__FUNCTION__, mDpy);
ret = false;
}
}
if(mDestRight != ovutils::OV_INVALID) {
- if (!ov.queueBuffer(hnd->fd, hnd->offset, mDestRight)) {
+ if (!ov.queueBuffer(hnd->fd, (uint32_t)hnd->offset, mDestRight)) {
ALOGE("%s: queue failed for right of dpy = %d",
__FUNCTION__, mDpy);
ret = false;