qdutils/qservice: fix compilation warnings

- fix incorrect type casting.
- remove unused variables.

Change-Id: I4d21fe895b048a9dcb7c43297d44b041ba42d735
diff --git a/libqdutils/display_config.cpp b/libqdutils/display_config.cpp
index 45b0211..60f1f68 100644
--- a/libqdutils/display_config.cpp
+++ b/libqdutils/display_config.cpp
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2013 The Linux Foundation. All rights reserved.
+* Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
@@ -37,7 +37,7 @@
 
 int isExternalConnected(void) {
     int ret;
-    status_t err = FAILED_TRANSACTION;
+    status_t err = (status_t) FAILED_TRANSACTION;
     sp<IQService> binder = getBinder();
     Parcel inParcel, outParcel;
     if(binder != NULL) {
@@ -54,7 +54,7 @@
 }
 
 int getDisplayAttributes(int dpy, DisplayAttributes_t& dpyattr) {
-    status_t err = FAILED_TRANSACTION;
+    status_t err = (status_t) FAILED_TRANSACTION;
     sp<IQService> binder = getBinder();
     Parcel inParcel, outParcel;
     inParcel.writeInt32(dpy);
@@ -76,7 +76,7 @@
 }
 
 int setHSIC(int dpy, const HSICData_t& hsic_data) {
-    status_t err = FAILED_TRANSACTION;
+    status_t err = (status_t) FAILED_TRANSACTION;
     sp<IQService> binder = getBinder();
     Parcel inParcel, outParcel;
     inParcel.writeInt32(dpy);
@@ -93,7 +93,7 @@
 }
 
 int getDisplayVisibleRegion(int dpy, hwc_rect_t &rect) {
-    status_t err = FAILED_TRANSACTION;
+    status_t err = (status_t) FAILED_TRANSACTION;
     sp<IQService> binder = getBinder();
     Parcel inParcel, outParcel;
     inParcel.writeInt32(dpy);
diff --git a/libqdutils/mdp_version.cpp b/libqdutils/mdp_version.cpp
index b743d7a..9e36980 100644
--- a/libqdutils/mdp_version.cpp
+++ b/libqdutils/mdp_version.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
 
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -99,7 +99,7 @@
                                 char* tokenStr[], int *idx) {
     char *tmp_token = NULL;
     char *temp_ptr;
-    int ret = 0, index = 0;
+    int index = 0;
     if (!inputParams) {
         return -1;
     }
diff --git a/libqdutils/qdMetaData.cpp b/libqdutils/qdMetaData.cpp
index f39eef9..ecbf873 100644
--- a/libqdutils/qdMetaData.cpp
+++ b/libqdutils/qdMetaData.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -31,6 +31,8 @@
 #include <sys/mman.h>
 #include <cutils/log.h>
 #include <gralloc_priv.h>
+#define __STDC_FORMAT_MACROS 1
+#include <inttypes.h>
 #include "qdMetaData.h"
 
 int setMetaData(private_handle_t *handle, DispParamType paramType,
@@ -106,7 +108,7 @@
             break;
     }
     if(munmap(base, size))
-        ALOGE("%s: failed to unmap ptr 0x%x, err %d", __func__, (int)base,
+        ALOGE("%s: failed to unmap ptr 0x%"PRIdPTR", err %d", __func__, (intptr_t)base,
                                                                         errno);
     return 0;
 }