summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Hall <jessehall@google.com>2014-08-07 22:43:06 -0700
committerJesse Hall <jessehall@google.com>2014-10-31 09:52:23 -0700
commit784421160727c434c2a2897ed3345445fcc30f75 (patch)
tree81636df51f47a5e5c9a6ff727a8f1fb695fff6e3
parent9b901805ed2e918c25e13134757a967caaaeebb9 (diff)
downloadframeworks_native-784421160727c434c2a2897ed3345445fcc30f75.zip
frameworks_native-784421160727c434c2a2897ed3345445fcc30f75.tar.gz
frameworks_native-784421160727c434c2a2897ed3345445fcc30f75.tar.bz2
surfaceflinger: fix -Wsign-compare warnings
warning: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned int') [-Wsign-compare] arning: comparison of integers of different signs: 'int32_t' (aka 'int') and 'const uint32_t' (aka 'const unsigned int') [-Wsign-compare] Change-Id: I823257aa7218c5fd492a3277853210db539bb2e2 (cherry picked from f9bfdc6c9449143eed674c03e15dd8278296d32b)
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 17e984a..cc47e16 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -653,7 +653,7 @@ status_t SurfaceFlinger::setActiveConfig(const sp<IBinder>& display, int mode) {
virtual bool handler() {
Vector<DisplayInfo> configs;
mFlinger.getDisplayConfigs(mDisplay, &configs);
- if(mMode < 0 || mMode >= configs.size()) {
+ if (mMode < 0 || mMode >= static_cast<int>(configs.size())) {
ALOGE("Attempt to set active config = %d for display with %zu configs",
mMode, configs.size());
}
@@ -3104,13 +3104,13 @@ void SurfaceFlinger::renderScreenImplLocked(
if (sourceCrop.left < 0) {
ALOGE("Invalid crop rect: l = %d (< 0)", sourceCrop.left);
}
- if (sourceCrop.right > hw_w) {
+ if (static_cast<uint32_t>(sourceCrop.right) > hw_w) {
ALOGE("Invalid crop rect: r = %d (> %d)", sourceCrop.right, hw_w);
}
if (sourceCrop.top < 0) {
ALOGE("Invalid crop rect: t = %d (< 0)", sourceCrop.top);
}
- if (sourceCrop.bottom > hw_h) {
+ if (static_cast<uint32_t>(sourceCrop.bottom) > hw_h) {
ALOGE("Invalid crop rect: b = %d (> %d)", sourceCrop.bottom, hw_h);
}