drm_hwcomposer: Fix DrmProperty log build failure
DrmProperty logs the uint64_t property value if it is unrecognized.
However, this type can be represented multiple ways:
* unsigned long (%lu)
* unsigned long long (%llu)
This generates build errors when the wrong type is used.
The correct way to log the value with with |PRIu64|.
Signed-off-by: Tim Van Patten <timvp@google.com>
diff --git a/drm/DrmProperty.cpp b/drm/DrmProperty.cpp
index 0ea9143..dbd307e 100644
--- a/drm/DrmProperty.cpp
+++ b/drm/DrmProperty.cpp
@@ -22,6 +22,7 @@
#include <xf86drmMode.h>
#include <cerrno>
+#include <cinttypes>
#include <cstdint>
#include <string>
@@ -138,7 +139,7 @@
}
}
- ALOGE("Property '%s' has no matching enum for value: %lu", name_.c_str(),
+ ALOGE("Property '%s' has no matching enum for value: %" PRIu64, name_.c_str(),
value);
return {};
}