drm_hwcomposer: Fix build warning in HwcLayer::SetLayerBlendMode
In building with AOSP, I ran into the following warning:
external/drm_hwcomposer/hwc2_device/HwcLayer.cpp:44:43: warning: format specifies type 'int' but the argument has type 'BufferBlendMode' [-Wformat]
44 | ALOGE("Unknown blending mode b=%d", blend_mode_);
| ~~ ^~~~~~~~~~~
| static_cast<int>(
It seems odd to print the old blend_mode_ value here instead of the
passed-in mode argument. So switch it so we are printing the invalid
value given
Signed-off-by: John Stultz <jstultz@google.com>
Change-Id: Id0fc0a4a5ba093db5c4b6ac99255344fa5112879
diff --git a/hwc2_device/HwcLayer.cpp b/hwc2_device/HwcLayer.cpp
index dd5359f..12da418 100644
--- a/hwc2_device/HwcLayer.cpp
+++ b/hwc2_device/HwcLayer.cpp
@@ -41,7 +41,7 @@
blend_mode_ = BufferBlendMode::kCoverage;
break;
default:
- ALOGE("Unknown blending mode b=%d", blend_mode_);
+ ALOGE("Unknown blending mode b=%d", mode);
blend_mode_ = BufferBlendMode::kUndefined;
break;
}