qdutils/qservice: fix compilation warnings
- fix incorrect type casting.
- remove unused variables.
Change-Id: I4d21fe895b048a9dcb7c43297d44b041ba42d735
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;
}