libgui: 64 bit compile issues (part deux)
- nsecs_t printed with PRId64
- int64_t/uint64_t print issues
- some size_t printing issues.
- missing argument to BQ_LOGV
Change-Id: I493f2b578e801dc38c44f8c536faa45266720402
diff --git a/libs/gui/BufferQueueConsumer.cpp b/libs/gui/BufferQueueConsumer.cpp
index f3f26ac..36e3c06 100644
--- a/libs/gui/BufferQueueConsumer.cpp
+++ b/libs/gui/BufferQueueConsumer.cpp
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#include <inttypes.h>
+
#define LOG_TAG "BufferQueueConsumer"
#define ATRACE_TAG ATRACE_TAG_GRAPHICS
//#define LOG_NDEBUG 0
@@ -104,14 +106,16 @@
// This buffer is set to display in the near future, or
// desiredPresent is garbage. Either way we don't want to drop
// the previous buffer just to get this on the screen sooner.
- BQ_LOGV("acquireBuffer: nodrop desire=%lld expect=%lld "
- "(%lld) now=%lld", desiredPresent, expectedPresent,
+ BQ_LOGV("acquireBuffer: nodrop desire=%" PRId64 " expect=%"
+ PRId64 " (%" PRId64 ") now=%" PRId64,
+ desiredPresent, expectedPresent,
desiredPresent - expectedPresent,
systemTime(CLOCK_MONOTONIC));
break;
}
- BQ_LOGV("acquireBuffer: drop desire=%lld expect=%lld size=%d",
+ BQ_LOGV("acquireBuffer: drop desire=%" PRId64 " expect=%" PRId64
+ " size=%zu",
desiredPresent, expectedPresent, mCore->mQueue.size());
if (mCore->stillTracking(front)) {
// Front buffer is still in mSlots, so mark the slot as free
@@ -125,15 +129,16 @@
nsecs_t desiredPresent = front->mTimestamp;
if (desiredPresent > expectedPresent &&
desiredPresent < expectedPresent + MAX_REASONABLE_NSEC) {
- BQ_LOGV("acquireBuffer: defer desire=%lld expect=%lld "
- "(%lld) now=%lld", desiredPresent, expectedPresent,
+ BQ_LOGV("acquireBuffer: defer desire=%" PRId64 " expect=%" PRId64
+ " (%" PRId64 ") now=%" PRId64,
+ desiredPresent, expectedPresent,
desiredPresent - expectedPresent,
systemTime(CLOCK_MONOTONIC));
return PRESENT_LATER;
}
- BQ_LOGV("acquireBuffer: accept desire=%lld expect=%lld "
- "(%lld) now=%lld", desiredPresent, expectedPresent,
+ BQ_LOGV("acquireBuffer: accept desire=%" PRId64 " expect=%" PRId64 " "
+ "(%" PRId64 ") now=%" PRId64, desiredPresent, expectedPresent,
desiredPresent - expectedPresent,
systemTime(CLOCK_MONOTONIC));
}
@@ -142,7 +147,7 @@
*outBuffer = *front;
ATRACE_BUFFER_INDEX(slot);
- BQ_LOGV("acquireBuffer: acquiring { slot=%d/%llu buffer=%p }",
+ BQ_LOGV("acquireBuffer: acquiring { slot=%d/%" PRIu64 " buffer=%p }",
slot, front->mFrameNumber, front->mGraphicBuffer->handle);
// If the front buffer is still being tracked, update its slot state
if (mCore->stillTracking(front)) {