hwc: Use proper typecasts
- Remove compiler warnings
- Use proper typecasts
Change-Id: I7391f32ae31283239f5cebb93b02f3ce3a5c99f3
diff --git a/libhwcomposer/hwc_ad.cpp b/libhwcomposer/hwc_ad.cpp
index 236093b..be3793a 100644
--- a/libhwcomposer/hwc_ad.cpp
+++ b/libhwcomposer/hwc_ad.cpp
@@ -82,7 +82,7 @@
if(adFd >= 0) {
char opStr[4] = "";
snprintf(opStr, sizeof(opStr), "%d", value);
- int ret = write(adFd, opStr, strlen(opStr));
+ ssize_t ret = write(adFd, opStr, strlen(opStr));
if(ret < 0) {
ALOGE("%s: Failed to write %d with error %s",
__func__, value, strerror(errno));
@@ -206,7 +206,8 @@
return false;
}
- int tmpW, tmpH, size;
+ int tmpW, tmpH;
+ size_t size;
int format = ovutils::getHALFormat(wb->getOutputFormat());
if(format < 0) {
ALOGE("%s invalid format %d", __func__, format);
@@ -217,7 +218,7 @@
size = getBufferSizeAndDimensions(hnd->width, hnd->height,
format, tmpW, tmpH);
- if(!wb->configureMemory(size)) {
+ if(!wb->configureMemory((uint32_t)size)) {
ALOGE("%s: config memory failed", __func__);
mDoable = false;
return false;