!34 解决x86_64 编译将char识别成signed char造成的编译问题

Merge pull request !34 from 黑眼圈/20220901_libsoup_x86_64
This commit is contained in:
openharmony_ci
2022-09-01 06:32:56 +00:00
committed by Gitee
2 changed files with 1 additions and 7 deletions
+1 -1
View File
@@ -22,7 +22,7 @@ config("libsoup_config") {
"-Wno-sign-compare",
"-Wno-#pragma-messages",
"-DOHOS_GLIB_COMPATIBLE",
"-DOHOS_OPT_COMPAT",
"-fno-signed-char",
]
}
-6
View File
@@ -638,14 +638,8 @@ sniff_feed_or_html (SoupContentSniffer *sniffer, SoupBuffer *buffer)
goto text_html;
/* Skip a leading UTF-8 BOM */
// ohos.opt.compat.2001 x86_64 -Wtautological-constant-out-of-range-compare
#ifdef OHOS_OPT_COMPAT
if (resource[0] == (char)0xEF && resource[1] == (char)0xBB && resource[2] == (char)0xBF)
pos = 3;
#else
if (resource[0] == 0xEF && resource[1] == 0xBB && resource[2] == 0xBF)
pos = 3;
#endif
look_for_tag:
if (pos > resource_length)