diff --git a/BUILD.gn b/BUILD.gn index ef75d8596c83d5163fe0acb670ce58a2882f3b3e..c6c4b96b3f49cd1ac9159d08dcfe8cebce572c3a 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -273,7 +273,7 @@ lite_library("ui") { } else { cflags = [ "--diag_suppress", - "Pa093,Pa137,Pe177,Pe186,Pe226,Pe366,Pe367,Pe550", + "Pa093,Pa137,Pe177,Pe186,Pe223,Pe226,Pe366,Pe367,Pe550,Pe940", ] cflags_cc = cflags } diff --git a/frameworks/common/image.cpp b/frameworks/common/image.cpp index ad2ee862e6e912bff2ef4b2741bec42d8484ed14..4f890a85404f3cf7e9f5fa1efbf3190a2e194e7e 100644 --- a/frameworks/common/image.cpp +++ b/frameworks/common/image.cpp @@ -235,7 +235,8 @@ bool Image::PreParse(const char *src) return false; } path_ = path; - bool isSucess = false; + bool isSucess = true; +#if ENABLE_JPEG_AND_PNG ImageType imageType = CheckImgType(src); if (imageType == IMG_PNG) { isSucess = SetPNGSrc(src); @@ -247,6 +248,7 @@ bool Image::PreParse(const char *src) srcType_ = IMG_SRC_UNKNOWN; return false; } +#endif return isSucess; }