From 717a44be8f9f9282e6708b78cb3f2bbc8de7cb3a Mon Sep 17 00:00:00 2001 From: Sean Paul Date: Wed, 11 May 2016 13:49:38 -0400 Subject: DO NOT MERGE: drm_hwcomposer: Fix up some printf warnings and a clang-style nit BUG=None TEST=Compiles Change-Id: Ie95aad60b225784c36d411ec16a34ff32ea8acc6 Signed-off-by: Sean Paul --- drmdisplaycompositor.cpp | 4 ++-- drmplane.cpp | 3 ++- drmresources.cpp | 8 +++++--- platform.h | 1 - 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/drmdisplaycompositor.cpp b/drmdisplaycompositor.cpp index aaef8e4..df8e331 100644 --- a/drmdisplaycompositor.cpp +++ b/drmdisplaycompositor.cpp @@ -807,7 +807,7 @@ out: if (!test_only && mode_.needs_modeset) { ret = drm_->DestroyPropertyBlob(mode_.old_blob_id); if (ret) { - ALOGE("Failed to destroy old mode property blob %lld/%d", + ALOGE("Failed to destroy old mode property blob %" PRIu32 "/%d", mode_.old_blob_id, ret); return ret; } @@ -858,7 +858,7 @@ std::tuple DrmDisplayCompositor::CreateModeBlob( ALOGE("Failed to create mode property blob %d", ret); return std::make_tuple(ret, 0); } - ALOGE("Create blob_id %ld\n", id); + ALOGE("Create blob_id %" PRIu32 "\n", id); return std::make_tuple(ret, id); } diff --git a/drmplane.cpp b/drmplane.cpp index 2314c39..c4ea722 100644 --- a/drmplane.cpp +++ b/drmplane.cpp @@ -19,6 +19,7 @@ #include "drmplane.h" #include "drmresources.h" +#include #include #include @@ -53,7 +54,7 @@ int DrmPlane::Init() { type_ = (uint32_t)type; break; default: - ALOGE("Invalid plane type %d", type); + ALOGE("Invalid plane type %" PRIu64, type); return -EINVAL; } diff --git a/drmresources.cpp b/drmresources.cpp index 81381c3..e433239 100644 --- a/drmresources.cpp +++ b/drmresources.cpp @@ -23,6 +23,7 @@ #include "drmplane.h" #include "drmresources.h" +#include #include #include #include @@ -321,7 +322,7 @@ int DrmResources::DestroyPropertyBlob(uint32_t blob_id) { destroy_blob.blob_id = (__u32)blob_id; int ret = drmIoctl(fd(), DRM_IOCTL_MODE_DESTROYPROPBLOB, &destroy_blob); if (ret) { - ALOGE("Failed to destroy mode property blob %ld/%d", blob_id, ret); + ALOGE("Failed to destroy mode property blob %" PRIu32 "/%d", blob_id, ret); return ret; } return 0; @@ -348,7 +349,7 @@ int DrmResources::SetDisplayActiveMode(int display, const DrmMode &mode) { int DrmResources::SetDpmsMode(int display, uint64_t mode) { if (mode != DRM_MODE_DPMS_ON && mode != DRM_MODE_DPMS_OFF) { - ALOGE("Invalid dpms mode %d", mode); + ALOGE("Invalid dpms mode %" PRIu64, mode); return -EINVAL; } @@ -359,7 +360,8 @@ int DrmResources::SetDpmsMode(int display, uint64_t mode) { } int ret = comp->SetDpmsMode(display, mode); if (ret) { - ALOGE("Failed to add dpms %ld to composition on %d %d", mode, display, ret); + ALOGE("Failed to add dpms %" PRIu64 " to composition on %d %d", mode, + display, ret); return ret; } ret = compositor_.QueueComposition(std::move(comp)); diff --git a/platform.h b/platform.h index fb6cf61..059c40e 100644 --- a/platform.h +++ b/platform.h @@ -47,5 +47,4 @@ class Importer { virtual int ReleaseBuffer(hwc_drm_bo_t *bo) = 0; }; } - #endif -- cgit v1.2.3