summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Paul <seanpaul@chromium.org>2016-05-11 13:49:38 -0400
committerSean Paul <seanpaul@chromium.org>2016-05-11 13:49:38 -0400
commitf741c672bade253f172c642049a3b8f25d3bcb22 (patch)
tree718046cfa0b4f2ca17366e4e5e8b7db2bfef3bae
parent0aee6b2afa33652722641cbf3d4cc1689e1baa1b (diff)
downloaddrm_hwcomposer-f741c672bade253f172c642049a3b8f25d3bcb22.tar.gz
drm_hwcomposer-f741c672bade253f172c642049a3b8f25d3bcb22.tar.xz
drm_hwcomposer: Fix up some printf warnings and a clang-style nit
BUG=None TEST=Compiles Change-Id: Ie95aad60b225784c36d411ec16a34ff32ea8acc6 Signed-off-by: Sean Paul <seanpaul@chromium.org>
-rw-r--r--drmdisplaycompositor.cpp4
-rw-r--r--drmplane.cpp3
-rw-r--r--drmresources.cpp8
-rw-r--r--platform.h1
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<int, uint32_t> 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 <cinttypes>
#include <errno.h>
#include <stdint.h>
@@ -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 <cinttypes>
#include <errno.h>
#include <fcntl.h>
#include <stdint.h>
@@ -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