Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Unity
提交
d6b35087
T
Third Party Unity
项目概览
OpenHarmony
/
Third Party Unity
1 年多 前同步成功
通知
36
Star
144
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Unity
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d6b35087
编写于
3月 26, 2017
作者:
M
Mark VanderVoord
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Clean up some const issues, particularly when moving between single and double pointers
上级
4ffafce3
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
13 deletion
+13
-13
src/unity.c
src/unity.c
+12
-12
test/targets/clang_strict.yml
test/targets/clang_strict.yml
+1
-1
未找到文件。
src/unity.c
浏览文件 @
d6b35087
...
...
@@ -1025,8 +1025,8 @@ void UnityAssertEqualStringArray(UNITY_INTERNAL_PTR expected,
{
UNITY_UINT32
i
=
0
;
UNITY_UINT32
j
=
0
;
const
char
*
exp
;
const
char
*
act
;
const
char
*
exp
=
NULL
;
const
char
*
act
=
NULL
;
RETURN_IF_FAIL_OR_IGNORE
;
...
...
@@ -1036,7 +1036,7 @@ void UnityAssertEqualStringArray(UNITY_INTERNAL_PTR expected,
UnityPrintPointlessAndBail
();
}
if
((
const
char
**
)
expected
==
actual
)
if
((
const
void
*
)
expected
==
(
const
void
*
)
actual
)
{
return
;
/* Both are NULL or same pointer */
}
...
...
@@ -1056,7 +1056,7 @@ void UnityAssertEqualStringArray(UNITY_INTERNAL_PTR expected,
act
=
actual
[
j
];
if
(
flags
==
UNITY_ARRAY_TO_ARRAY
)
{
exp
=
((
const
char
**
)
expected
)[
j
];
exp
=
((
const
char
*
const
*
)
expected
)[
j
];
}
/* if both pointers not null compare the strings */
...
...
@@ -1175,20 +1175,20 @@ UNITY_INTERNAL_PTR UnityNumToPtr(const UNITY_INT num, const UNITY_UINT8 size)
switch
(
size
)
{
case
1
:
UnityQuickCompare
.
i8
=
num
;
UnityQuickCompare
.
i8
=
(
UNITY_INT8
)
num
;
return
(
UNITY_INTERNAL_PTR
)(
&
UnityQuickCompare
.
i8
);
case
2
:
UnityQuickCompare
.
i16
=
num
;
UnityQuickCompare
.
i16
=
(
UNITY_INT16
)
num
;
return
(
UNITY_INTERNAL_PTR
)(
&
UnityQuickCompare
.
i16
);
#ifdef UNITY_SUPPORT_64
case
8
:
UnityQuickCompare
.
i64
=
num
;
UnityQuickCompare
.
i64
=
(
UNITY_INT64
)
num
;
return
(
UNITY_INTERNAL_PTR
)(
&
UnityQuickCompare
.
i64
);
#endif
default:
//4 bytes
UnityQuickCompare
.
i32
=
num
;
UnityQuickCompare
.
i32
=
(
UNITY_INT32
)
num
;
return
(
UNITY_INTERNAL_PTR
)(
&
UnityQuickCompare
.
i32
);
}
}
...
...
@@ -1405,9 +1405,9 @@ int UnityParseOptions(int argc, char** argv)
int
IsStringInBiggerString
(
const
char
*
longstring
,
const
char
*
shortstring
)
{
c
har
*
lptr
=
(
char
*
)
longstring
;
c
har
*
sptr
=
(
char
*
)
shortstring
;
char
*
lnext
=
lptr
;
c
onst
char
*
lptr
=
longstring
;
c
onst
char
*
sptr
=
shortstring
;
c
onst
c
har
*
lnext
=
lptr
;
if
(
*
sptr
==
'*'
)
return
1
;
...
...
@@ -1439,7 +1439,7 @@ int IsStringInBiggerString(const char* longstring, const char* shortstring)
/* Otherwise we start in the long pointer 1 character further and try again */
lptr
=
lnext
;
sptr
=
(
char
*
)
shortstring
;
sptr
=
shortstring
;
}
return
0
;
}
...
...
test/targets/clang_strict.yml
浏览文件 @
d6b35087
...
...
@@ -36,7 +36,7 @@ compiler:
-
'
-Wbad-function-cast'
-
'
-fms-extensions'
-
'
-fno-omit-frame-pointer'
-
'
-ffloat-store'
#
- '-ffloat-store'
-
'
-fno-common'
-
'
-fstrict-aliasing'
-
'
-std=gnu99'
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录