1
0
Fork 0

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>
This commit is contained in:
Tim Van Patten 2024-10-28 13:49:24 -06:00
parent 634c89ccc0
commit 2c36651af0

View file

@ -22,6 +22,7 @@
#include <xf86drmMode.h>
#include <cerrno>
#include <cinttypes>
#include <cstdint>
#include <string>
@ -138,7 +139,7 @@ std::optional<std::string> DrmProperty::GetEnumNameFromValue(
}
}
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 {};
}