From 38f6a09c7fe6a077365ed02a453ab074cf5e91e5 Mon Sep 17 00:00:00 2001 From: Yi Kong Date: Tue, 5 Dec 2023 16:59:10 +0900 Subject: Fix -Wformat compiler warning error: format specifies type 'int' but the argument has type 'ui::Dataspace' [-Werror,-Wformat] 91 | LOG_ALWAYS_FATAL("%s isTextureValid:%d dataspace:%d" | ~~ 92 | "\n\tGrBackendTexture: (%i x %i) hasMipmaps: %i isProtected: %i texType: %i" 93 | "\n\t\tGrGLTextureInfo: success: %i fTarget: %u fFormat: %u colorType %i", 94 | msg, tex.isValid(), dataspace, tex.width(), tex.height(), tex.hasMipmaps(), | ^~~~~~~~~ | static_cast( ) Test: build with upstream Clang (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d90ebf37bac881823a701190afd871dbc7495624) Merged-In: I81868618064fbb189affb0f55c4e3ab94e78430b Change-Id: I81868618064fbb189affb0f55c4e3ab94e78430b --- libs/renderengine/skia/AutoBackendTexture.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs') diff --git a/libs/renderengine/skia/AutoBackendTexture.cpp b/libs/renderengine/skia/AutoBackendTexture.cpp index 23c99b0796..e8ad081e60 100644 --- a/libs/renderengine/skia/AutoBackendTexture.cpp +++ b/libs/renderengine/skia/AutoBackendTexture.cpp @@ -94,8 +94,8 @@ void logFatalTexture(const char* msg, const GrBackendTexture& tex, ui::Dataspace "\n\tGrBackendTexture: (%i x %i) hasMipmaps: %i isProtected: %i " "texType: %i\n\t\tGrGLTextureInfo: success: %i fTarget: %u fFormat: %u" " colorType %i", - msg, tex.isValid(), dataspace, tex.width(), tex.height(), - tex.hasMipmaps(), tex.isProtected(), + msg, tex.isValid(), static_cast(dataspace), tex.width(), + tex.height(), tex.hasMipmaps(), tex.isProtected(), static_cast(tex.textureType()), retrievedTextureInfo, textureInfo.fTarget, textureInfo.fFormat, colorType); break; -- cgit v1.2.3-59-g8ed1b