Fix signed/unsigned integer comparison warning
allowed_pending_fence_count is apparently an int32_t, which made clang
unhappy when compared with the size_t from calling size().
Cast size() to an int32_t, since I doubt we'll have > 2.1 billion FDs
open any time soon. :)
Bug: None
Test: mma. Warning is gone.
Change-Id: I895b2c6e1a6d5a42c692470f6a5c5fd22d55b2ff
diff --git a/libs/vr/libvrflinger/hardware_composer.cpp b/libs/vr/libvrflinger/hardware_composer.cpp
index d937c88..4479d1e 100644
--- a/libs/vr/libvrflinger/hardware_composer.cpp
+++ b/libs/vr/libvrflinger/hardware_composer.cpp
@@ -408,7 +408,7 @@
}
const bool is_frame_pending = IsFramePendingInDriver();
- const bool is_fence_pending = retire_fence_fds_.size() >
+ const bool is_fence_pending = static_cast<int32_t>(retire_fence_fds_.size()) >
post_thread_config_.allowed_pending_fence_count;
if (is_fence_pending || is_frame_pending) {