display: remove compiler warnings
Use correct typecasts and format specifiers and resolve
compiler warnings
Change-Id: I51b12ecb78a9a496cf1f76c3d32892a203f70c43
diff --git a/libhwcomposer/hwc_utils.cpp b/libhwcomposer/hwc_utils.cpp
index 671388b..aaa08d2 100644
--- a/libhwcomposer/hwc_utils.cpp
+++ b/libhwcomposer/hwc_utils.cpp
@@ -481,10 +481,10 @@
width = float(rect.right - rect.left);
height = float(rect.bottom - rect.top);
}
- xRatio = (float)(inPos.x/actualWidth);
- yRatio = (float)(inPos.y/actualHeight);
- wRatio = (float)(inPos.w/actualWidth);
- hRatio = (float)(inPos.h/actualHeight);
+ xRatio = (float)((float)inPos.x/actualWidth);
+ yRatio = (float)((float)inPos.y/actualHeight);
+ wRatio = (float)((float)inPos.w/actualWidth);
+ hRatio = (float)((float)inPos.h/actualHeight);
//Calculate the pos9ition...
outPos.x = uint32_t((xRatio * width) + (float)xPos);
@@ -1347,10 +1347,7 @@
//Waits for acquire fences, returns a release fence
if(LIKELY(!swapzero)) {
- uint64_t start = systemTime();
ret = ioctl(fbFd, MSMFB_BUFFER_SYNC, &data);
- ALOGD_IF(HWC_UTILS_DEBUG, "%s: time taken for MSMFB_BUFFER_SYNC IOCTL = %d",
- __FUNCTION__, (size_t) ns2ms(systemTime() - start));
}
if(ret < 0) {