summaryrefslogtreecommitdiffstats
path: root/libs/binder
diff options
context:
space:
mode:
authorChih-hung Hsieh <chh@google.com>2014-11-25 22:56:02 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-11-25 22:56:02 +0000
commita7c75d1b17556d9842a7823c94a2c96982687c63 (patch)
treed7c12da5ed705a92f49db7e661dd8443ce5a1d50 /libs/binder
parent22b99e3a9a5797deada897102e71e9a88ae46d24 (diff)
parent2d7ec9d7b5dfdb93930b94c134fa2dc10fd27313 (diff)
downloadframeworks_native-a7c75d1b17556d9842a7823c94a2c96982687c63.zip
frameworks_native-a7c75d1b17556d9842a7823c94a2c96982687c63.tar.gz
frameworks_native-a7c75d1b17556d9842a7823c94a2c96982687c63.tar.bz2
am 2d7ec9d7: Merge "Fix build with clang in C++11 mode"
* commit '2d7ec9d7b5dfdb93930b94c134fa2dc10fd27313': Fix build with clang in C++11 mode
Diffstat (limited to 'libs/binder')
-rw-r--r--libs/binder/IPCThreadState.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp
index d29f671..8633691 100644
--- a/libs/binder/IPCThreadState.cpp
+++ b/libs/binder/IPCThreadState.cpp
@@ -147,9 +147,9 @@ static const void* printReturnCommand(TextOutput& out, const void* _cmd)
{
static const size_t N = sizeof(kReturnStrings)/sizeof(kReturnStrings[0]);
const int32_t* cmd = (const int32_t*)_cmd;
- int32_t code = *cmd++;
+ uint32_t code = (uint32_t)*cmd++;
size_t cmdIndex = code & 0xff;
- if (code == (int32_t) BR_ERROR) {
+ if (code == BR_ERROR) {
out << "BR_ERROR: " << (void*)(long)(*cmd++) << endl;
return cmd;
} else if (cmdIndex >= N) {
@@ -208,7 +208,7 @@ static const void* printCommand(TextOutput& out, const void* _cmd)
{
static const size_t N = sizeof(kCommandStrings)/sizeof(kCommandStrings[0]);
const int32_t* cmd = (const int32_t*)_cmd;
- int32_t code = *cmd++;
+ uint32_t code = (uint32_t)*cmd++;
size_t cmdIndex = code & 0xff;
if (cmdIndex >= N) {
@@ -697,7 +697,7 @@ status_t IPCThreadState::sendReply(const Parcel& reply, uint32_t flags)
status_t IPCThreadState::waitForResponse(Parcel *reply, status_t *acquireResult)
{
- int32_t cmd;
+ uint32_t cmd;
int32_t err;
while (1) {
@@ -706,7 +706,7 @@ status_t IPCThreadState::waitForResponse(Parcel *reply, status_t *acquireResult)
if (err < NO_ERROR) break;
if (mIn.dataAvail() == 0) continue;
- cmd = mIn.readInt32();
+ cmd = (uint32_t)mIn.readInt32();
IF_LOG_COMMANDS() {
alog << "Processing waitForResponse Command: "
@@ -936,7 +936,7 @@ status_t IPCThreadState::executeCommand(int32_t cmd)
RefBase::weakref_type* refs;
status_t result = NO_ERROR;
- switch (cmd) {
+ switch ((uint32_t)cmd) {
case BR_ERROR:
result = mIn.readInt32();
break;