Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Harfbuzz
提交
6353cc1f
T
Third Party Harfbuzz
项目概览
OpenHarmony
/
Third Party Harfbuzz
接近 2 年 前同步成功
通知
1
Star
18
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Harfbuzz
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
6353cc1f
编写于
10月 02, 2018
作者:
E
Ebrahim Byagowi
提交者:
GitHub
10月 02, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[circleci] Fix some of warnings from clang-everything bot (#1211)
* -Wshift-sign-overflow * -Wmissing-prototypes
上级
9f1dee32
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
36 addition
and
30 deletion
+36
-30
.circleci/config.yml
.circleci/config.yml
+2
-2
src/dump-emoji.cc
src/dump-emoji.cc
+10
-9
src/hb-ucdn.cc
src/hb-ucdn.cc
+3
-0
src/test-unicode-ranges.cc
src/test-unicode-ranges.cc
+2
-2
test/fuzzing/hb-subset-fuzzer.cc
test/fuzzing/hb-subset-fuzzer.cc
+17
-15
util/ansi-print.cc
util/ansi-print.cc
+2
-2
未找到文件。
.circleci/config.yml
浏览文件 @
6353cc1f
...
...
@@ -89,9 +89,9 @@ jobs:
-
run
:
echo "deb http://apt.llvm.org/cosmic/ llvm-toolchain-cosmic main" > /etc/apt/sources.list.d/llvmdev.list
-
run
:
echo "deb-src http://apt.llvm.org/cosmic/ llvm-toolchain-cosmic main" > /etc/apt/sources.list.d/llvmdevsrc.list
-
run
:
apt update ||
true
-
run
:
apt install -y clang lld binutils libtool autoconf automake make pkg-config gtk-doc-tools ragel libfreetype6-dev libglib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev python python-pip
-
run
:
apt install -y clang lld binutils libtool autoconf automake make pkg-config gtk-doc-tools ragel libfreetype6-dev lib
fontconfig1-dev lib
glib2.0-dev libcairo2-dev libicu-dev libgraphite2-dev python python-pip
-
run
:
pip install fonttools
-
run
:
CFLAGS="-Weverything -Wno-
padded -Wno-cast-qual -Wno-sign-conversion -Wno-conversion -Wno-documentation -Wno-documentation-unknown-command -Wno-reserved-id-macro" CXXFLAGS="-Weverything -Wno-undef -Wno-deprecated-declarations -Wno-weak-vtables -Wno-old-style-cast -Wno-documentation -Wno-documentation-unknown-command -Wno-conversion -Wno-sign-conversion -Wno-c++98-compat -Wno-extra-semi -Wno-c++98-compat-pedantic -Wno-padded -Wno-shift-sign-overflow -Wno-missing-field-initializers -Wno-double-promotion -Wno-reserved-id-macro -Wno-cast-qual -Wno-unused-parameter -Wno-comma -Wno-shadow -Wno-used-but-marked-unused -Wno-format-pedantic -Wno-zero-as-null-pointer-constant -Wno-disabled-macro-expansion -Wno-covered-switch-default -Wno-conditional-uninitialized -Wno-unreachable-code -Wno-unused-macros -Wno-float-equal -Wno-missing-prototypes" CC=clang CXX=clang++ ./autogen.sh --with-freetype --with-glib --with-cairo --with-icu --with-graphite2
-
run
:
CFLAGS="-Weverything -Wno-
reserved-id-macro -Wno-conversion -Wno-padded -Wno-sign-conversion -Wno-cast-qual -Wno-documentation -Wno-documentation-unknown-command" CXXFLAGS="-Weverything -Wno-old-style-cast -Wno-documentation -Wno-documentation-unknown-command -Wno-c++98-compat -Wno-cast-qual -Wno-c++98-compat-pedantic -Wno-sign-conversion -Wno-padded -Wno-shorten-64-to-32 -Wno-extra-semi -Wno-reserved-id-macro -Wno-float-conversion -Wno-format-pedantic -Wno-shadow -Wno-conversion -Wno-zero-as-null-pointer-constant -Wno-missing-field-initializers -Wno-double-promotion -Wno-used-but-marked-unused -Wno-unused-macros -Wno-comma -Wno-float-equal -Wno-disabled-macro-expansion -Wno-weak-vtables -Wno-unused-parameter -Wno-covered-switch-default -Wno-unreachable-code -Wno-deprecated-declarations" CC=clang CXX=clang++ ./autogen.sh --with-freetype --with-glib --with-cairo --with-icu --with-graphite2 --with-fontconfig
-
run
:
make -j32 CPPFLAGS="-Werror"
-
run
:
make check CPPFLAGS="-Werror" || .ci/fail.sh
...
...
src/dump-emoji.cc
浏览文件 @
6353cc1f
...
...
@@ -45,8 +45,8 @@
#include <stdlib.h>
#include <stdio.h>
void
cbdt_callback
(
const
uint8_t
*
data
,
unsigned
int
length
,
unsigned
int
group
,
unsigned
int
gid
)
static
void
cbdt_callback
(
const
uint8_t
*
data
,
unsigned
int
length
,
unsigned
int
group
,
unsigned
int
gid
)
{
char
output_path
[
255
];
sprintf
(
output_path
,
"out/cbdt-%d-%d.png"
,
group
,
gid
);
...
...
@@ -55,8 +55,8 @@ void cbdt_callback (const uint8_t* data, unsigned int length,
fclose
(
f
);
}
void
sbix_callback
(
const
uint8_t
*
data
,
unsigned
int
length
,
unsigned
int
group
,
unsigned
int
gid
)
static
void
sbix_callback
(
const
uint8_t
*
data
,
unsigned
int
length
,
unsigned
int
group
,
unsigned
int
gid
)
{
char
output_path
[
255
];
sprintf
(
output_path
,
"out/sbix-%d-%d.png"
,
group
,
gid
);
...
...
@@ -65,8 +65,8 @@ void sbix_callback (const uint8_t* data, unsigned int length,
fclose
(
f
);
}
void
svg_callback
(
const
uint8_t
*
data
,
unsigned
int
length
,
unsigned
int
start_glyph
,
unsigned
int
end_glyph
)
static
void
svg_callback
(
const
uint8_t
*
data
,
unsigned
int
length
,
unsigned
int
start_glyph
,
unsigned
int
end_glyph
)
{
char
output_path
[
255
];
if
(
start_glyph
==
end_glyph
)
...
...
@@ -83,8 +83,8 @@ void svg_callback (const uint8_t* data, unsigned int length,
fclose
(
f
);
}
void
colr_cpal_rendering
(
cairo_font_face_t
*
cairo_face
,
unsigned
int
upem
,
unsigned
int
num_glyphs
,
const
OT
::
COLR
*
colr
,
const
OT
::
CPAL
*
cpal
)
static
void
colr_cpal_rendering
(
cairo_font_face_t
*
cairo_face
,
unsigned
int
upem
,
unsigned
int
num_glyphs
,
const
OT
::
COLR
*
colr
,
const
OT
::
CPAL
*
cpal
)
{
for
(
unsigned
int
i
=
0
;
i
<
num_glyphs
;
++
i
)
{
...
...
@@ -162,7 +162,8 @@ void colr_cpal_rendering (cairo_font_face_t *cairo_face, unsigned int upem, unsi
}
}
void
dump_glyphs
(
cairo_font_face_t
*
cairo_face
,
unsigned
int
upem
,
unsigned
int
num_glyphs
)
static
void
dump_glyphs
(
cairo_font_face_t
*
cairo_face
,
unsigned
int
upem
,
unsigned
int
num_glyphs
)
{
// Dump every glyph available on the font
return
;
// disabled for now
...
...
src/hb-ucdn.cc
浏览文件 @
6353cc1f
...
...
@@ -274,6 +274,9 @@ void free_static_ucdn_funcs (void)
#endif
extern
"C"
HB_INTERNAL
hb_unicode_funcs_t
*
hb_ucdn_get_unicode_funcs
(
void
);
hb_unicode_funcs_t
*
hb_ucdn_get_unicode_funcs
(
void
)
{
...
...
src/test-unicode-ranges.cc
浏览文件 @
6353cc1f
...
...
@@ -28,7 +28,7 @@
#include "hb-ot-os2-unicode-ranges.hh"
void
static
void
test
(
hb_codepoint_t
cp
,
unsigned
int
bit
)
{
if
(
OT
::
hb_get_unicode_range_bit
(
cp
)
!=
bit
)
...
...
@@ -41,7 +41,7 @@ test (hb_codepoint_t cp, unsigned int bit)
}
}
void
static
void
test_get_unicode_range_bit
(
void
)
{
test
(
0x0000
,
0
);
...
...
test/fuzzing/hb-subset-fuzzer.cc
浏览文件 @
6353cc1f
...
...
@@ -6,11 +6,12 @@
#include "hb-subset.h"
void
trySubset
(
hb_face_t
*
face
,
const
hb_codepoint_t
text
[],
int
text_length
,
bool
drop_hints
,
bool
drop_layout
)
static
void
trySubset
(
hb_face_t
*
face
,
const
hb_codepoint_t
text
[],
int
text_length
,
bool
drop_hints
,
bool
drop_layout
)
{
hb_subset_input_t
*
input
=
hb_subset_input_create_or_fail
();
hb_subset_input_set_drop_hints
(
input
,
drop_hints
);
...
...
@@ -28,16 +29,17 @@ void trySubset (hb_face_t *face,
hb_subset_input_destroy
(
input
);
}
void
trySubset
(
hb_face_t
*
face
,
const
hb_codepoint_t
text
[],
int
text_length
)
static
void
trySubset
(
hb_face_t
*
face
,
const
hb_codepoint_t
text
[],
int
text_length
)
{
for
(
unsigned
int
drop_hints
=
0
;
drop_hints
<
2
;
drop_hints
++
)
{
for
(
unsigned
int
drop_layout
=
0
;
drop_layout
<
2
;
drop_layout
++
)
{
trySubset
(
face
,
text
,
text_length
,
(
bool
)
drop_hints
,
(
bool
)
drop_layout
);
(
bool
)
drop_hints
,
(
bool
)
drop_layout
);
}
}
}
...
...
@@ -45,22 +47,22 @@ void trySubset (hb_face_t *face,
extern
"C"
int
LLVMFuzzerTestOneInput
(
const
uint8_t
*
data
,
size_t
size
)
{
hb_blob_t
*
blob
=
hb_blob_create
((
const
char
*
)
data
,
size
,
HB_MEMORY_MODE_READONLY
,
NULL
,
NULL
);
HB_MEMORY_MODE_READONLY
,
NULL
,
NULL
);
hb_face_t
*
face
=
hb_face_create
(
blob
,
0
);
const
hb_codepoint_t
text
[]
=
{
'A'
,
'B'
,
'C'
,
'D'
,
'E'
,
'X'
,
'Y'
,
'Z'
,
'1'
,
'2'
,
'3'
,
'@'
,
'_'
,
'%'
,
'&'
,
')'
,
'*'
,
'$'
,
'!'
'A'
,
'B'
,
'C'
,
'D'
,
'E'
,
'X'
,
'Y'
,
'Z'
,
'1'
,
'2'
,
'3'
,
'@'
,
'_'
,
'%'
,
'&'
,
')'
,
'*'
,
'$'
,
'!'
};
trySubset
(
face
,
text
,
sizeof
(
text
)
/
sizeof
(
hb_codepoint_t
));
hb_codepoint_t
text_from_data
[
16
];
if
(
size
>
sizeof
(
text_from_data
))
{
memcpy
(
text_from_data
,
data
+
size
-
sizeof
(
text_from_data
),
sizeof
(
text_from_data
));
memcpy
(
text_from_data
,
data
+
size
-
sizeof
(
text_from_data
),
sizeof
(
text_from_data
));
unsigned
int
text_size
=
sizeof
(
text_from_data
)
/
sizeof
(
hb_codepoint_t
);
trySubset
(
face
,
text_from_data
,
text_size
);
}
...
...
util/ansi-print.cc
浏览文件 @
6353cc1f
...
...
@@ -71,7 +71,7 @@ struct color_t
{
static
color_t
from_ansi
(
unsigned
int
x
)
{
color_t
c
=
{(
0xFF
<<
24
)
|
((
0xFF
*
(
x
&
1
))
<<
16
)
|
((
0xFF
*
((
x
>>
1
)
&
1
))
<<
8
)
|
(
0xFF
*
((
x
>>
2
)
&
1
))};
color_t
c
=
{(
0xFF
u
<<
24
)
|
((
0xFFu
*
(
x
&
1
))
<<
16
)
|
((
0xFFu
*
((
x
>>
1
)
&
1
))
<<
8
)
|
(
0xFFu
*
((
x
>>
2
)
&
1
))};
return
c
;
}
unsigned
int
to_ansi
(
void
)
...
...
@@ -223,7 +223,7 @@ struct biimage_t
uint8_t
*
const
data
;
};
const
char
*
static
const
char
*
block_best
(
const
biimage_t
&
bi
,
bool
*
inverse
)
{
assert
(
bi
.
width
<=
CELL_W
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录