OSDN Git Service

drm_hwcomposer: Fix build warnings
authorSean Paul <seanpaul@chromium.org>
Tue, 29 Mar 2016 17:55:35 +0000 (13:55 -0400)
committerSean Paul <seanpaul@chromium.org>
Tue, 29 Mar 2016 17:56:13 +0000 (13:56 -0400)
A cleanup patch to fix the build warnings that have surfaced
from the new build system.

BUG=None
TEST=Builds without warnings

Change-Id: I2ad898e627d451f87705d2bdf06a315b8e1c7a1c
Signed-off-by: Sean Paul <seanpaul@chromium.org>
drmdisplaycomposition.h
hwcomposer.cpp
nvimporter.cpp

index 3c94e6b..3ab934d 100644 (file)
@@ -32,7 +32,7 @@
 
 namespace android {
 
-struct SquashState;
+class SquashState;
 
 enum DrmCompositionType {
   DRM_COMPOSITION_TYPE_EMPTY,
index 0e0444b..a81d6cc 100644 (file)
@@ -968,19 +968,19 @@ static int hwc_device_open(const struct hw_module_t *module, const char *name,
 }
 
 static struct hw_module_methods_t hwc_module_methods = {
-  open : android::hwc_device_open
+  .open = android::hwc_device_open
 };
 
 hwc_module_t HAL_MODULE_INFO_SYM = {
-  common : {
-    tag : HARDWARE_MODULE_TAG,
-    version_major : 1,
-    version_minor : 0,
-    id : HWC_HARDWARE_MODULE_ID,
-    name : "DRM hwcomposer module",
-    author : "The Android Open Source Project",
-    methods : &hwc_module_methods,
-    dso : NULL,
-    reserved : {0},
+  .common = {
+    .tag = HARDWARE_MODULE_TAG,
+    .version_major = 1,
+    .version_minor = 0,
+    .id = HWC_HARDWARE_MODULE_ID,
+    .name = "DRM hwcomposer module",
+    .author = "The Android Open Source Project",
+    .methods = &hwc_module_methods,
+    .dso = NULL,
+    .reserved = {0},
   }
 };
index d5c3abc..febcb4f 100644 (file)
@@ -20,6 +20,7 @@
 #include "importer.h"
 #include "nvimporter.h"
 
+#include <cinttypes>
 #include <stdatomic.h>
 #include <xf86drm.h>
 #include <xf86drmMode.h>
@@ -124,7 +125,7 @@ int NvImporter::ImportBuffer(buffer_handle_t handle, hwc_drm_bo_t *bo) {
 int NvImporter::ReleaseBuffer(hwc_drm_bo_t *bo) {
   NvBuffer_t *buf = (NvBuffer_t *)bo->priv;
   if (!buf) {
-    ALOGE("Freeing bo %ld, buf is NULL!", bo->fb_id);
+    ALOGE("Freeing bo %" PRIu32 ", buf is NULL!", bo->fb_id);
     return 0;
   }
   if (atomic_fetch_sub(&buf->ref, 1) > 1)