Skip to content

drm_hwcomposer: Fix build warning in HwcLayer::SetLayerBlendMode

John Stultz requested to merge john.stultz/drm-hwcomposer:build-warning-fix into main
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 <>
Change-Id: Id0fc0a4a5ba093db5c4b6ac99255344fa5112879
Edited by John Stultz

Merge request reports