From 862f049d178e6158e62fb80ec3cacccf0fe3966b Mon Sep 17 00:00:00 2001 From: Kai Sky Date: Fri, 24 Nov 2023 14:20:20 +0000 Subject: [PATCH] Looper: Fixed compile error when enabling DEBUG_CALLBACKS When enabling DEBUG_CALLBACKS , compiler complains for the undeclared identifier 'fd'. Fix by removing undeclared objects. Change-Id: I751a9ef9d8843350105acd6a30645f897050ffa4 --- libutils/Android.bp | 1 + libutils/Looper.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libutils/Android.bp b/libutils/Android.bp index 4d4294b9b..85a0fd209 100644 --- a/libutils/Android.bp +++ b/libutils/Android.bp @@ -203,6 +203,7 @@ cc_library { defaults: ["libutils_impl_defaults"], cflags: [ + "-DDEBUG_CALLBACKS=1", "-DDEBUG_POLL_AND_WAKE=1", "-DDEBUG_REFS=1", "-DDEBUG_TOKENIZER=1", diff --git a/libutils/Looper.cpp b/libutils/Looper.cpp index 402e43cc6..576c61dc6 100644 --- a/libutils/Looper.cpp +++ b/libutils/Looper.cpp @@ -534,7 +534,7 @@ int Looper::removeFd(int fd) { int Looper::removeSequenceNumberLocked(SequenceNumber seq) { #if DEBUG_CALLBACKS - ALOGD("%p ~ removeFd - fd=%d, seq=%u", this, fd, seq); + ALOGD("%p ~ removeFd - seq=%" PRIu64, this, seq); #endif const auto& request_it = mRequests.find(seq);